]> granicus.if.org Git - curl/commitdiff
use (void) in front of fwrite() calls that ignore the return code
authorDaniel Stenberg <daniel@haxx.se>
Mon, 15 Feb 2010 21:29:19 +0000 (21:29 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 15 Feb 2010 21:29:19 +0000 (21:29 +0000)
src/main.c

index 3d097fd1d8c5dd7e92fee5591c0cb9b595b98081..b60aeb1e68d8919b5e4401731a77842e73b1b6ce 100644 (file)
@@ -652,7 +652,7 @@ static void warnf(struct Configurable *config, const char *fmt, ...)
              max text width then! */
           cut = WARN_TEXTWIDTH-1;
 
-        fwrite(ptr, cut + 1, 1, config->errors);
+        (void)fwrite(ptr, cut + 1, 1, config->errors);
         fputs("\n", config->errors);
         ptr += cut+1; /* skip the space too */
         len -= cut;
@@ -3704,14 +3704,14 @@ int my_trace(CURL *handle, curl_infotype type,
           if(!newl) {
             fprintf(output, "%s%s ", timebuf, s_infotype[type]);
           }
-          fwrite(data+st, i-st+1, 1, output);
+          (void)fwrite(data+st, i-st+1, 1, output);
           st = i+1;
           newl = FALSE;
         }
       }
       if(!newl)
         fprintf(output, "%s%s ", timebuf, s_infotype[type]);
-      fwrite(data+st, i-st+1, 1, output);
+      (void)fwrite(data+st, i-st+1, 1, output);
       newl = (bool)(size && (data[size-1] != '\n'));
       traced_data = FALSE;
       break;
@@ -3719,7 +3719,7 @@ int my_trace(CURL *handle, curl_infotype type,
     case CURLINFO_HEADER_IN:
       if(!newl)
         fprintf(output, "%s%s ", timebuf, s_infotype[type]);
-      fwrite(data, size, 1, output);
+      (void)fwrite(data, size, 1, output);
       newl = (bool)(size && (data[size-1] != '\n'));
       traced_data = FALSE;
       break;