Fix some warnings

This commit is contained in:
Alexander Batalov 2022-08-29 23:58:03 +03:00
parent 2a0d0633f1
commit b3431fadf7
2 changed files with 10 additions and 10 deletions

View File

@ -11,7 +11,7 @@
int strParseInt(char** stringPtr, int* valuePtr) int strParseInt(char** stringPtr, int* valuePtr)
{ {
char *str, *remaining_str; char *str, *remaining_str;
int v1, v2, v3; size_t v1, v2, v3;
char tmp; char tmp;
if (*stringPtr == NULL) { if (*stringPtr == NULL) {
@ -55,7 +55,7 @@ int strParseStrFromList(char** stringPtr, int* valuePtr, const char** stringList
{ {
int i; int i;
char *str, *remaining_str; char *str, *remaining_str;
int v1, v2, v3; size_t v1, v2, v3;
char tmp; char tmp;
if (*stringPtr == NULL) { if (*stringPtr == NULL) {
@ -110,7 +110,7 @@ int strParseStrFromList(char** stringPtr, int* valuePtr, const char** stringList
int strParseStrFromFunc(char** stringPtr, int* valuePtr, StringParserCallback* callback) int strParseStrFromFunc(char** stringPtr, int* valuePtr, StringParserCallback* callback)
{ {
char *str, *remaining_str; char *str, *remaining_str;
int v1, v2, v3; size_t v1, v2, v3;
char tmp; char tmp;
int result; int result;
@ -159,7 +159,7 @@ int strParseStrFromFunc(char** stringPtr, int* valuePtr, StringParserCallback* c
int strParseIntWithKey(char** stringPtr, const char* key, int* valuePtr, const char* delimeter) int strParseIntWithKey(char** stringPtr, const char* key, int* valuePtr, const char* delimeter)
{ {
char* str; char* str;
int v1, v2, v3, v4, v5; size_t v1, v2, v3, v4, v5;
char tmp1, tmp2; char tmp1, tmp2;
int result; int result;
@ -213,7 +213,7 @@ int strParseIntWithKey(char** stringPtr, const char* key, int* valuePtr, const c
int strParseKeyValue(char** stringPtr, char* key, int* valuePtr, const char* delimiter) int strParseKeyValue(char** stringPtr, char* key, int* valuePtr, const char* delimiter)
{ {
char* str; char* str;
int v1, v2, v3, v4, v5; size_t v1, v2, v3, v4, v5;
char tmp1, tmp2; char tmp1, tmp2;
if (*stringPtr == NULL) { if (*stringPtr == NULL) {

View File

@ -2109,11 +2109,11 @@ int _wmParseTerrainTypes(Config* config, char* string)
pch += strspn(pch, " "); pch += strspn(pch, " ");
int endPos = strcspn(pch, ","); size_t endPos = strcspn(pch, ",");
char end = pch[endPos]; char end = pch[endPos];
pch[endPos] = '\0'; pch[endPos] = '\0';
int delimeterPos = strcspn(pch, ":"); size_t delimeterPos = strcspn(pch, ":");
char delimeter = pch[delimeterPos]; char delimeter = pch[delimeterPos];
pch[delimeterPos] = '\0'; pch[delimeterPos] = '\0';
@ -2230,7 +2230,7 @@ int worldmapFindTerrainByLookupName(char* string, int* valuePtr)
int _wmParseEncounterItemType(char** stringPtr, ENC_BASE_TYPE_38_48* a2, int* a3, const char* delim) int _wmParseEncounterItemType(char** stringPtr, ENC_BASE_TYPE_38_48* a2, int* a3, const char* delim)
{ {
char* string; char* string;
int v2, v3; size_t v2, v3;
char tmp, tmp2; char tmp, tmp2;
int v20; int v20;
@ -2368,8 +2368,8 @@ int worldmapConfigParseCondition(char** stringPtr, const char* a2, EncounterCond
int worldmapConfigParseConditionEntry(char** stringPtr, const char* a2, int* typePtr, int* operatorPtr, int* paramPtr, int* valuePtr) int worldmapConfigParseConditionEntry(char** stringPtr, const char* a2, int* typePtr, int* operatorPtr, int* paramPtr, int* valuePtr)
{ {
char* pch; char* pch;
int v2; size_t v2;
int v3; size_t v3;
char tmp; char tmp;
char tmp2; char tmp2;
int v57; int v57;