fixed compiler warnings issued by:
gcc 4.3 curl.h gcc type-checking glibc with enabled FORTIFY_SOURCE checking
This commit is contained in:
+1
-1
@@ -860,7 +860,7 @@ load_acerts(void)
|
||||
}
|
||||
}
|
||||
/* restore directory path */
|
||||
chdir(save_dir);
|
||||
ignore_result(chdir(save_dir));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -295,7 +295,7 @@ load_authcerts(const char *type, const char *path, u_char auth_flags)
|
||||
}
|
||||
}
|
||||
/* restore directory path */
|
||||
chdir(save_dir);
|
||||
ignore_result(chdir(save_dir));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -373,7 +373,7 @@ load_crls(void)
|
||||
}
|
||||
}
|
||||
/* restore directory path */
|
||||
chdir(save_dir);
|
||||
ignore_result(chdir(save_dir));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+8
-1
@@ -249,6 +249,7 @@ write_chunk(const char *filename, const char *label, chunk_t ch
|
||||
{
|
||||
mode_t oldmask;
|
||||
FILE *fd;
|
||||
size_t written;
|
||||
|
||||
if (!force)
|
||||
{
|
||||
@@ -268,8 +269,14 @@ write_chunk(const char *filename, const char *label, chunk_t ch
|
||||
|
||||
if (fd)
|
||||
{
|
||||
fwrite(ch.ptr, sizeof(u_char), ch.len, fd);
|
||||
written = fwrite(ch.ptr, sizeof(u_char), ch.len, fd);
|
||||
fclose(fd);
|
||||
if (written != ch.len)
|
||||
{
|
||||
plog(" writing to %s file '%s' failed", label, filename);
|
||||
umask(oldmask);
|
||||
return FALSE;
|
||||
}
|
||||
plog(" written %s file '%s' (%d bytes)", label, filename, (int)ch.len);
|
||||
umask(oldmask);
|
||||
return TRUE;
|
||||
|
||||
+3
-3
@@ -324,7 +324,7 @@ fetch_curl(char *url, chunk_t *blob)
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_buffer);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&response);
|
||||
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, &errorbuffer);
|
||||
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorbuffer);
|
||||
curl_easy_setopt(curl, CURLOPT_FAILONERROR, TRUE);
|
||||
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, FETCH_CMD_TIMEOUT);
|
||||
|
||||
@@ -705,9 +705,9 @@ fetch_ocsp_status(ocsp_location_t* location)
|
||||
curl_easy_setopt(curl, CURLOPT_URL, uri);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_buffer);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&response);
|
||||
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, request.ptr);
|
||||
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, (void*)request.ptr);
|
||||
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, request.len);
|
||||
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, &errorbuffer);
|
||||
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorbuffer);
|
||||
curl_easy_setopt(curl, CURLOPT_FAILONERROR, TRUE);
|
||||
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, FETCH_CMD_TIMEOUT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user