mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04: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;
|
char *value;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
DEBUGASSERT(header);
|
|
||||||
|
|
||||||
/* Find the end of the header name */
|
/* Find the end of the header name */
|
||||||
while(*header && (*header != ':'))
|
while(*header && (*header != ':'))
|
||||||
++header;
|
++header;
|
||||||
|
@ -220,8 +220,6 @@ CURLofft curlx_strtoofft(const char *str, char **endp, int base,
|
|||||||
errno = 0;
|
errno = 0;
|
||||||
*num = 0; /* clear by default */
|
*num = 0; /* clear by default */
|
||||||
|
|
||||||
DEBUGASSERT(str);
|
|
||||||
|
|
||||||
while(*str && ISSPACE(*str))
|
while(*str && ISSPACE(*str))
|
||||||
str++;
|
str++;
|
||||||
if('-' == *str) {
|
if('-' == *str) {
|
||||||
|
Loading…
Reference in New Issue
Block a user