Hi all,

There were a total of two compiler warnings I'd get on master when using clang.
I've attached a patch to rectify them.

These warnings occur when compiled with no extra CFLAGS.

-- 
Thanking You,
Darshit Shah
From 6d76c099774fcc3675b85fd47718283854a55f08 Mon Sep 17 00:00:00 2001
From: Darshit Shah <[email protected]>
Date: Wed, 26 Mar 2014 00:51:04 +0100
Subject: [PATCH] Fix compiler warnings

---
 src/ChangeLog | 6 ++++++
 src/ftp.c     | 8 ++++++--
 src/utils.c   | 2 +-
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 0d471ca..4f88172 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-26  Darshit Shah  <[email protected]>
+
+	* 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  <[email protected]>
 
 	* url.c (shorten_length): Remove unused function.
diff --git a/src/ftp.c b/src/ftp.c
index 5282588..00d753a 100644
--- 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)
diff --git a/src/utils.c b/src/utils.c
index 4354668..01be3ea 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -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[] = {
-- 
1.9.1

Reply via email to