Fix compiler warnings generated when compiling with -Wall flag. #44
These commits resolve all of the warnings which were generated when compiling the current library with the
The text was updated successfully, but these errors were encountered:
Remove the typedef storage class specifier from the declaration of the URLPARAM_RESULT enum as this is not required and causes gcc to emit the warning "'typedef' was ignored in this declaration" when compiling with -Wall.
Convert some of the int and char variables to be unsigned int and unsigned char types. This prevents gcc generating the warnings "comparison between signed and unsigned integer expressions" and "array subscript has type 'char'", as well as having a nice side-effect of shaving 42 bytes off the compiled size when building for the Uno.
The Command prototype has a char* parameter for the URL tail, but WebServer::dispatchCommand calls this with an empty string as a parameter if there is no URL. As gcc treats empty strings as const char*s this causes a warning to be emitted when compiling using -Wall, so suppress it by explicitly casting it to char*.