diff src/c/request.c @ 1134:b08b73591d2c

Switch to gcc -Wall
author Adam Chlipala <adamc@hcoop.net>
date Thu, 28 Jan 2010 13:32:26 -0500
parents 94e83c5533d2
children 15767031950c
line wrap: on
line diff
--- a/src/c/request.c	Thu Jan 28 10:48:49 2010 -0500
+++ b/src/c/request.c	Thu Jan 28 13:32:26 2010 -0500
@@ -122,11 +122,10 @@
                           int (*send)(int sockfd, const void *buf, size_t len),
                           int (*close)(int fd)) {
   int retries_left = MAX_RETRIES;
-  char *s;
   failure_kind fk;
-  int is_post = 0, do_normal_send = 1;
+  int is_post = 0;
   char *boundary = NULL;
-  size_t boundary_len;
+  size_t boundary_len = 0;
   char *inputs;
   const char *prefix = uw_get_url_prefix(ctx);
 
@@ -226,7 +225,7 @@
       after_sub_headers[2] = 0;
       after_sub_headers += 4;
 
-      for (header = part; after_header = strstr(header, "\r\n"); header = after_header + 2) {
+      for (header = part; (after_header = strstr(header, "\r\n")); header = after_header + 2) {
         char *colon, *after_colon;
 
         *after_header = 0;
@@ -246,7 +245,7 @@
             return FAILED;
           }
 
-          for (colon += 11; after_colon = strchr(colon, '='); colon = after_colon) {
+          for (colon += 11; (after_colon = strchr(colon, '=')); colon = after_colon) {
             char *data;
             after_colon[0] = 0;
             if (after_colon[1] != '"') {
@@ -304,12 +303,12 @@
 
       while (*inputs) {
         name = inputs;
-        if (inputs = strchr(inputs, '&'))
+        if ((inputs = strchr(inputs, '&')))
           *inputs++ = 0;
         else
           inputs = strchr(name, 0);
 
-        if (value = strchr(name, '=')) {
+        if ((value = strchr(name, '='))) {
           *value++ = 0;
           if (uw_set_input(ctx, name, value)) {
             log_error(logger_data, "%s\n", uw_error_message(ctx));