gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 81/254: lib: fix compiler warnings


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 81/254: lib: fix compiler warnings
Date: Sat, 17 Jun 2017 16:51:53 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to annotated tag gnurl-7.54.1
in repository gnurl.

commit cee39aa3beb2da995104a2c57fe9a24be6b9f6c0
Author: Marcel Raad <address@hidden>
AuthorDate: Tue May 2 20:47:13 2017 +0200

    lib: fix compiler warnings
    
    Fix the following warnings when building the tests by using the correct
    types:
    cast from 'const char *' to 'void *' drops const qualifier
    [-Wcast-qual]
    implicit conversion changes signedness [-Wsign-conversion]
---
 lib/memdebug.c | 4 ++--
 lib/mprintf.c  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/memdebug.c b/lib/memdebug.c
index 32d2adfb5..516f273c1 100644
--- a/lib/memdebug.c
+++ b/lib/memdebug.c
@@ -236,7 +236,7 @@ char *curl_dostrdup(const char *str, int line, const char 
*source)
 
   if(source)
     curl_memlog("MEM %s:%d strdup(%p) (%zu) = %p\n",
-                source, line, (void *)str, len, (void *)mem);
+                source, line, (const void *)str, len, (const void *)mem);
 
   return mem;
 }
@@ -480,7 +480,7 @@ void curl_memlog(const char *format, ...)
     nchars = LOGLINE_BUFSIZE - 1;
 
   if(nchars > 0)
-    fwrite(buf, 1, nchars, logfile);
+    fwrite(buf, 1, (size_t)nchars, logfile);
 
   (Curl_cfree)(buf);
 }
diff --git a/lib/mprintf.c b/lib/mprintf.c
index 6d4e733f0..037132c86 100644
--- a/lib/mprintf.c
+++ b/lib/mprintf.c
@@ -610,7 +610,7 @@ static int dprintf_formatf(
     int is_neg;
 
     /* Base of a number to be written.  */
-    long base;
+    unsigned long base;
 
     /* Integral values to be written.  */
     mp_uintmax_t num;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]