-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fixing lots of compilation warnings: #188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fix(esp8266): Adding includes for missing symbols. Removing unused variables. Use GCC's packing attribute when using GCC. Skip unsupported packing pragmas if not using GCC. Add rom_functions.h for symbols that come from the ESP ROM. Add attributes on ets_printf so GCC will check the syntax of the formatting string and types of the arguments. fix(freertos): Define functions that are useful. Use correct printf symbols when printing. fix(mqtt): `xTicksToWait` is unsigned, can't check for less than zero. Remove unused variables. fix(newlib): `_free_r()` returns `void`, not `void *`. fix(ssl): Make sure functions always return a value.
@wujiangang I just rebased this on top of master. |
os_printf("SWReq:%d\n", SWReq); | ||
os_printf("ShowCritical:%lu\n", uxCriticalNesting); | ||
os_printf("HdlMacSig:%c\n", HdlMacSig); | ||
os_printf("SWReq:%c\n", SWReq); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both HdlMacSig
and SWReq
are used as boolean values (either 0 or 1), even though a char
is used to store it, there is no point in print it as character.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, define HdlMacSig & SWReq as uint8_t is also OK.
@@ -237,17 +242,17 @@ void IRAM_ATTR vPortExitCritical(void) | |||
} | |||
} | |||
} else { | |||
ets_printf("E:C:%d\n", uxCriticalNesting); | |||
ets_printf("E:C:%lu\n", uxCriticalNesting); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be aware that the printf
function in the rom does not seem to support the 'l' prefix and this print would not work as expected. Casting uxCriticalNesting
to unsigned and using "%u" would work for both the rom version and the newlib version of printf
.
fix(freertos): Changing types of `HdlMacSig` and `SwReq` to `uint8_t`, they're only used as booleans. Change uxCriticalNesting to `unsigned int` instead of `portBASE_TYPE`, should be big enough for counting nesting and ets_printf can't properly unsigned long values.
@FlavioBayer @27-301 Thanks for the feedback! I've changed HdlMacSig and SWReq to uint8_t, and uxCriticalNesting to a normal unsigned int. |
- fix(esp8266): - Adding includes for missing symbols. - Removing unused variables. - Skip unsupported packing pragmas. - Add rom_functions.h for symbols that come from the ESP ROM. Add attributes on ets_printf so GCC will check the syntax of the formatting string and types of the arguments. - Add ETS_GPIO_INTR_EN(DIS)ABLE macro. - Use gpio_output_conf instead of gpio_output_set. - fix(freertos): - Define functions that are useful. - Use correct printf symbols when printing. - fix(lwip): - Ignore the warning in sntp. - fix(mqtt): - `xTicksToWait` is unsigned, can't check for less than zero. Remove unused variables. - fix(newlib): - `_free_r()` returns `void`, not `void *`. - Adding includes for missing symbols. - fix(ssl): - Make sure functions always return a value. Merges #188
@trygvis merged, some minor modifications from original PR. |
fix(esp8266): Adding includes for missing symbols.
Removing unused variables.
Use GCC's packing attribute when using GCC. Skip unsupported packing pragmas if
not using GCC.
Add rom_functions.h for symbols that come from the ESP ROM. Add attributes on
ets_printf so GCC will check the syntax of the formatting string and types of
the arguments.
fix(freertos): Define functions that are useful.
Use correct printf symbols when printing.
fix(mqtt):
xTicksToWait
is unsigned, can't check for less than zero. Removeunused variables.
fix(newlib):
_free_r()
returnsvoid
, notvoid *
.fix(ssl): Make sure functions always return a value.