Fixed compiler warnings.

This commit is contained in:
mikeller 2019-12-03 02:23:18 +13:00
parent 054bd66bc4
commit 56f725d6f3
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ int toupper(int c)
int strcasecmp(const char * s1, const char * s2) int strcasecmp(const char * s1, const char * s2)
{ {
return strncasecmp(s1, s2, (size_t)-1); return strncasecmp(s1, s2, (size_t)INT_MAX);
} }
int strncasecmp(const char * s1, const char * s2, size_t n) int strncasecmp(const char * s1, const char * s2, size_t n)

View File

@ -191,7 +191,7 @@ char *ftoa(float x, char *floatString)
dpLocation = strlen(intString2) - 3; dpLocation = strlen(intString2) - 3;
strncpy(floatString, intString2, dpLocation); memcpy(floatString, intString2, dpLocation);
floatString[dpLocation] = '\0'; floatString[dpLocation] = '\0';
strcat(floatString, decimalPoint); strcat(floatString, decimalPoint);
strcat(floatString, intString2 + dpLocation); strcat(floatString, intString2 + dpLocation);