Skip to content

Fix warnings, NULL is meant for pointers only.#18

Open
JoakimSoderberg wants to merge 1 commit intointeractive-matter:masterfrom
JoakimSoderberg:fix_warnings
Open

Fix warnings, NULL is meant for pointers only.#18
JoakimSoderberg wants to merge 1 commit intointeractive-matter:masterfrom
JoakimSoderberg:fix_warnings

Conversation

@JoakimSoderberg
Copy link

Hello, I got some of these warnings when compiling:

HTTPClient/HTTPClient.cpp:412:18: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null]
   lastReturnCode = NULL;

Since int HTTPClient::skipHeader(FILE* stream) returns an int...

Also usually NULL is defined as 0, so using that as an error case when 0 is also returned as success does not make much sense.

However, the return value for skipHeader is never checked anywhere.... so this is just to shut up the compiler mostly.

Also usually NULL is defined as 0, so using that as an error case when 0 is also returned as success does not make much sense.

However, the return value for skipHeader is never checked anywhere.... so this is just to shut up the compiler mostly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant