mirror of
https://github.com/moparisthebest/curl
synced 2025-01-11 05:58:01 -05:00
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
This commit is contained in:
parent
75f517f968
commit
0f31647cf7
@ -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;
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user