Loading CHANGES +4 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,10 @@ Changelog Dan F (26 September 2007) - Enabled a few more gcc warnings with --enable-debug. Renamed a few variables to avoid shadowing global declarations. Daniel S (26 September 2007) - Philip Langdale provided the new CURLOPT_POST301 option for curl_easy_setopt() that alters how libcurl functions when following Loading acinclude.m4 +1 −1 Original line number Diff line number Diff line Loading @@ -1762,7 +1762,7 @@ AC_DEFUN([CURL_CC_DEBUG_OPTS], dnl only if the compiler is newer than 2.95 since we got lots of dnl "`_POSIX_C_SOURCE' is not defined" in system headers with dnl gcc 2.95.4 on FreeBSD 4.9! WARN="$WARN -Wundef -Wno-long-long -Wsign-compare" WARN="$WARN -Wundef -Wno-long-long -Wsign-compare -Wshadow -Wno-multichar" fi if test "$gccnum" -ge "296"; then Loading lib/file.c +3 −3 Original line number Diff line number Diff line Loading @@ -373,12 +373,12 @@ CURLcode Curl_file(struct connectdata *conn, bool *done) if(fstated) { const struct tm *tm; time_t clock = (time_t)statbuf.st_mtime; time_t filetime = (time_t)statbuf.st_mtime; #ifdef HAVE_GMTIME_R struct tm buffer; tm = (const struct tm *)gmtime_r(&clock, &buffer); tm = (const struct tm *)gmtime_r(&filetime, &buffer); #else tm = gmtime(&clock); tm = gmtime(&filetime); #endif /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */ snprintf(buf, BUFSIZE-1, Loading lib/formdata.c +4 −4 Original line number Diff line number Diff line Loading @@ -950,21 +950,21 @@ int curl_formget(struct curl_httppost *form, void *arg, for (ptr = data; ptr; ptr = ptr->next) { if (ptr->type == FORM_FILE) { char buffer[8192]; size_t read; size_t nread; struct Form temp; Curl_FormInit(&temp, ptr); do { read = readfromfile(&temp, buffer, sizeof(buffer)); if ((read == (size_t) -1) || (read != append(arg, buffer, read))) { nread = readfromfile(&temp, buffer, sizeof(buffer)); if ((nread == (size_t) -1) || (nread != append(arg, buffer, nread))) { if (temp.fp) { fclose(temp.fp); } Curl_formclean(&data); return -1; } } while (read == sizeof(buffer)); } while (nread == sizeof(buffer)); } else { if (ptr->length != append(arg, ptr->line, ptr->length)) { Curl_formclean(&data); Loading lib/ftp.c +7 −7 Original line number Diff line number Diff line Loading @@ -633,7 +633,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */ /* This is the ONLY way to change FTP state! */ static void state(struct connectdata *conn, ftpstate state) ftpstate newstate) { #if defined(CURLDEBUG) && !defined(CURL_DISABLE_VERBOSE_STRINGS) /* for debug purposes */ Loading Loading @@ -674,11 +674,11 @@ static void state(struct connectdata *conn, #endif struct ftp_conn *ftpc = &conn->proto.ftpc; #if defined(CURLDEBUG) && !defined(CURL_DISABLE_VERBOSE_STRINGS) if(ftpc->state != state) if(ftpc->state != newstate) infof(conn->data, "FTP %p state change from %s to %s\n", ftpc, names[ftpc->state], names[state]); ftpc, names[ftpc->state], names[newstate]); #endif ftpc->state = state; ftpc->state = newstate; } static CURLcode ftp_state_user(struct connectdata *conn) Loading Loading @@ -1882,12 +1882,12 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn, data->set.get_filetime && (data->info.filetime>=0) ) { struct tm *tm; time_t clock = (time_t)data->info.filetime; time_t filetime = (time_t)data->info.filetime; #ifdef HAVE_GMTIME_R struct tm buffer; tm = (struct tm *)gmtime_r(&clock, &buffer); tm = (struct tm *)gmtime_r(&filetime, &buffer); #else tm = gmtime(&clock); tm = gmtime(&filetime); #endif /* format: "Tue, 15 Nov 1994 12:45:26" */ snprintf(buf, BUFSIZE-1, Loading Loading
CHANGES +4 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,10 @@ Changelog Dan F (26 September 2007) - Enabled a few more gcc warnings with --enable-debug. Renamed a few variables to avoid shadowing global declarations. Daniel S (26 September 2007) - Philip Langdale provided the new CURLOPT_POST301 option for curl_easy_setopt() that alters how libcurl functions when following Loading
acinclude.m4 +1 −1 Original line number Diff line number Diff line Loading @@ -1762,7 +1762,7 @@ AC_DEFUN([CURL_CC_DEBUG_OPTS], dnl only if the compiler is newer than 2.95 since we got lots of dnl "`_POSIX_C_SOURCE' is not defined" in system headers with dnl gcc 2.95.4 on FreeBSD 4.9! WARN="$WARN -Wundef -Wno-long-long -Wsign-compare" WARN="$WARN -Wundef -Wno-long-long -Wsign-compare -Wshadow -Wno-multichar" fi if test "$gccnum" -ge "296"; then Loading
lib/file.c +3 −3 Original line number Diff line number Diff line Loading @@ -373,12 +373,12 @@ CURLcode Curl_file(struct connectdata *conn, bool *done) if(fstated) { const struct tm *tm; time_t clock = (time_t)statbuf.st_mtime; time_t filetime = (time_t)statbuf.st_mtime; #ifdef HAVE_GMTIME_R struct tm buffer; tm = (const struct tm *)gmtime_r(&clock, &buffer); tm = (const struct tm *)gmtime_r(&filetime, &buffer); #else tm = gmtime(&clock); tm = gmtime(&filetime); #endif /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */ snprintf(buf, BUFSIZE-1, Loading
lib/formdata.c +4 −4 Original line number Diff line number Diff line Loading @@ -950,21 +950,21 @@ int curl_formget(struct curl_httppost *form, void *arg, for (ptr = data; ptr; ptr = ptr->next) { if (ptr->type == FORM_FILE) { char buffer[8192]; size_t read; size_t nread; struct Form temp; Curl_FormInit(&temp, ptr); do { read = readfromfile(&temp, buffer, sizeof(buffer)); if ((read == (size_t) -1) || (read != append(arg, buffer, read))) { nread = readfromfile(&temp, buffer, sizeof(buffer)); if ((nread == (size_t) -1) || (nread != append(arg, buffer, nread))) { if (temp.fp) { fclose(temp.fp); } Curl_formclean(&data); return -1; } } while (read == sizeof(buffer)); } while (nread == sizeof(buffer)); } else { if (ptr->length != append(arg, ptr->line, ptr->length)) { Curl_formclean(&data); Loading
lib/ftp.c +7 −7 Original line number Diff line number Diff line Loading @@ -633,7 +633,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */ /* This is the ONLY way to change FTP state! */ static void state(struct connectdata *conn, ftpstate state) ftpstate newstate) { #if defined(CURLDEBUG) && !defined(CURL_DISABLE_VERBOSE_STRINGS) /* for debug purposes */ Loading Loading @@ -674,11 +674,11 @@ static void state(struct connectdata *conn, #endif struct ftp_conn *ftpc = &conn->proto.ftpc; #if defined(CURLDEBUG) && !defined(CURL_DISABLE_VERBOSE_STRINGS) if(ftpc->state != state) if(ftpc->state != newstate) infof(conn->data, "FTP %p state change from %s to %s\n", ftpc, names[ftpc->state], names[state]); ftpc, names[ftpc->state], names[newstate]); #endif ftpc->state = state; ftpc->state = newstate; } static CURLcode ftp_state_user(struct connectdata *conn) Loading Loading @@ -1882,12 +1882,12 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn, data->set.get_filetime && (data->info.filetime>=0) ) { struct tm *tm; time_t clock = (time_t)data->info.filetime; time_t filetime = (time_t)data->info.filetime; #ifdef HAVE_GMTIME_R struct tm buffer; tm = (struct tm *)gmtime_r(&clock, &buffer); tm = (struct tm *)gmtime_r(&filetime, &buffer); #else tm = gmtime(&clock); tm = gmtime(&filetime); #endif /* format: "Tue, 15 Nov 1994 12:45:26" */ snprintf(buf, BUFSIZE-1, Loading