Fix compiler warnings
authorDarshit Shah <darnir@gmail.com>
Tue, 25 Mar 2014 23:51:04 +0000 (00:51 +0100)
committerGiuseppe Scrivano <gscrivan@redhat.com>
Wed, 26 Mar 2014 11:38:39 +0000 (12:38 +0100)
src/ChangeLog
src/ftp.c
src/utils.c

index 0d471ca8608973a310d8a0b3d1b50f74895eb20e..4f88172bce30ee293b9aa8e7eec5df6c21e7db73 100644 (file)
@@ -1,3 +1,9 @@
+2014-03-26  Darshit Shah  <darnir@gmail.com>
+
+       * ftp.c (getftp): Rearrange parameters to fix compiler warning
+       * utils.c (get_dir_matches_p): Do not pass a const char** to a function that
+       expects char**
+
 2014-03-25  Daniel Stenberg  <daniel@haxx.se>
 
        * url.c (shorten_length): Remove unused function.
index 5282588dc392569ebac320589801513c90673ffe..00d753a8405d70d1270a32e9bedd4c2b4aa2a66e 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -802,8 +802,12 @@ Error in server response, closing control connection.\n"));
           abort ();
         }
         if (!opt.server_response)
-          logprintf (LOG_VERBOSE, expected_bytes ? "%s\n" : _("done.\n"),
-                     number_to_static_string (expected_bytes));
+          {
+            logprintf (LOG_VERBOSE, "%s\n",
+                    expected_bytes ?
+                    number_to_static_string (expected_bytes) :
+                    _("done.\n"));
+          }
     }
 
   if (cmd & DO_RETR && restval > 0 && restval == expected_bytes)
index 4354668c187e3f522b507846b2d5330dd2b169d4..01be3ea2d839298e08e7652a63d53bf0fa9445c1 100644 (file)
@@ -2509,7 +2509,7 @@ const char *
 test_dir_matches_p()
 {
   static struct {
-    const char *dirlist[3];
+    char *dirlist[3];
     const char *dir;
     bool result;
   } test_array[] = {