gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 68/178: lib: silence null-dereference warnings


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 68/178: lib: silence null-dereference warnings
Date: Wed, 23 May 2018 12:25:03 +0200

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

ng0 pushed a commit to branch master
in repository gnurl.

commit 0f31647cf7c0a9573f2bd18680099206c9e6daf7
Author: Marcel Raad <address@hidden>
AuthorDate: Mon Apr 9 15:53:12 2018 +0200

    lib: silence null-dereference warnings
    
    In debug mode, MingGW-w64's GCC 7.3 issues null-dereference warnings
    when dereferencing pointers after DEBUGASSERT-ing that they are not
    NULL.
    Fix this by removing the DEBUGASSERTs.
    
    Suggested-by: Daniel Stenberg
    Ref: https://github.com/curl/curl/pull/2463
---
 lib/http.c      | 2 --
 lib/strtoofft.c | 2 --
 2 files changed, 4 deletions(-)

diff --git a/lib/http.c b/lib/http.c
index 674e49665..ec709ff8d 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -214,8 +214,6 @@ char *Curl_copy_header_value(const char *header)
   char *value;
   size_t len;
 
-  DEBUGASSERT(header);
-
   /* Find the end of the header name */
   while(*header && (*header != ':'))
     ++header;
diff --git a/lib/strtoofft.c b/lib/strtoofft.c
index 363647737..546a3ff75 100644
--- a/lib/strtoofft.c
+++ b/lib/strtoofft.c
@@ -220,8 +220,6 @@ CURLofft curlx_strtoofft(const char *str, char **endp, int 
base,
   errno = 0;
   *num = 0; /* clear by default */
 
-  DEBUGASSERT(str);
-
   while(*str && ISSPACE(*str))
     str++;
   if('-' == *str) {

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



reply via email to

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