-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
lwm2m: uninitialized variable in this function #32853
Comments
How to reproduce this warning? I've tried to build with Besides, it doesn't look like a valid warning to me. Looking at the code in https:/zephyrproject-rtos/zephyr/blob/master/subsys/net/lib/lwm2m/lwm2m_rw_json.c#L144, the |
Try with: The warning show up when newlib is set to y. |
Thanks, now I got it. I wonder how would these options affect the build to trigger the warning to show up... |
I've submited a fix: #32882 |
I don't know either... |
Yes, that's what I did as well |
Thanks! |
Describe the bug
With Network, LwM2M and by default CONFIG_LWM2M_RW_JSON_SUPPORT=y in Zephyr 2.5 this warning show up:
/zephyrproject/zephyr/subsys/net/lib/lwm2m/lwm2m_rw_json.c:147:16: warning: 'c' may be used uninitialized in this function [-Wmaybe-uninitialized] 147 | uint8_t cont, c;
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: