In fields.h, while FieldList is an array, the array elements are each a POD struct of type Field, which has no non-default constructor. Therefore, according to the specification:
The effects of default initialization are:
…
otherwise, nothing is done: the objects with automatic storage duration (and their subobjects) are initialized to indeterminate values.
Fix Comparisons always false due to limited range of data type warning
Simply put, the long result from string.toInt() was placed into an uint8_t, prior to clamping the value. This change stores the conversion result in a long to perform the clamping prior to storing the value in the uint8_t field.
Fix warning: extra tokens at end of #include directive
Remove semi-colons from #include lines
Fix error: multi-line comment [-Werror=comment]
Ensure the last character of a comment line is not a backslash character.
Fix warning: 'typedef' was ignored in this declaration
Move the name Field to follow the struct definition.
Fixes #20 Fixes #10
Use
webserver.h
instead ofESP8266WebServer.h
Makes this build without dependencies.
Fix
Missing field initializers
warnings.In fields.h, while FieldList is an array, the array elements are each a POD struct of type Field, which has no non-default constructor. Therefore, according to the specification:
Fix
Comparisons always false due to limited range of data type
warningSimply put, the long result from string.toInt() was placed into an uint8_t, prior to clamping the value. This change stores the conversion result in a long to perform the clamping prior to storing the value in the uint8_t field.
Fix
warning: extra tokens at end of #include directive
Remove semi-colons from #include lines
Fix
error: multi-line comment [-Werror=comment]
Ensure the last character of a comment line is not a backslash character.
Fix
warning: 'typedef' was ignored in this declaration
Move the name
Field
to follow the struct definition.