1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

prevent two compiler warnings on comparisons between signed and unsigned

This commit is contained in:
Daniel Stenberg 2005-05-01 23:16:51 +00:00
parent c4dbed040b
commit 4be2136de4

View File

@ -2248,7 +2248,7 @@ static void parseconfig(const char *filename,
* We assume that we are using the ASCII version here. * We assume that we are using the ASCII version here.
*/ */
int n = GetModuleFileName(0, filebuffer, sizeof(filebuffer)); int n = GetModuleFileName(0, filebuffer, sizeof(filebuffer));
if (n > 0 && n < sizeof(filebuffer)) { if (n > 0 && n < (int)sizeof(filebuffer)) {
/* We got a valid filename - get the directory part */ /* We got a valid filename - get the directory part */
char *lastdirchar = strrchr(filebuffer, '\\'); char *lastdirchar = strrchr(filebuffer, '\\');
if (lastdirchar) { if (lastdirchar) {
@ -2256,7 +2256,7 @@ static void parseconfig(const char *filename,
*lastdirchar = 0; *lastdirchar = 0;
/* If we have enough space, build the RC filename */ /* If we have enough space, build the RC filename */
remaining = sizeof(filebuffer) - strlen(filebuffer); remaining = sizeof(filebuffer) - strlen(filebuffer);
if (strlen(CURLRC) < remaining - 1) { if ((int)strlen(CURLRC) < remaining - 1) {
snprintf(lastdirchar, remaining, snprintf(lastdirchar, remaining,
"%s%s", DIR_CHAR, CURLRC); "%s%s", DIR_CHAR, CURLRC);
/* Don't bother checking if it exists - we do /* Don't bother checking if it exists - we do