interactive-matter / HTTPClient

An Arduino HTTP Client
https://interactive-matter.eu/how-to/arduino-http-client-library/
101 stars 33 forks source link

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

Open JoakimSoderberg opened 8 years ago

JoakimSoderberg commented 8 years ago

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.