I am using the ESP32 port of Azure SDK. I noticed this issue mentioned in several places for many months but it has never been put into the master branch.
In file azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c
a local variable on line 1496 size_t request_id;
is not initialized.
When building in Release configuration, the compiler treats as a fatal error on line 1518.
azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c:1518:32:
error: 'request_id' may be used uninitialized in this function [-Werror=maybe-uninitialized]
Yes, I can edit this myself to set to 0, but I try to treat the Azure library as untouchable 3rd party code.
Can someone please check in the fix to the master branch?
Thanks!
Uninitialized var request_id causing compiler failure for Release
-
- Posts: 309
- Joined: Wed Feb 20, 2019 7:02 am
Re: Uninitialized var request_id causing compiler failure for Release
Since that code is part of an external codebase, we cannot change it as of now. However, we have aded a fix to suppress that error. Going ahead, when we move to a newer azure-iot-sdk-c , we will ensure that the error is fixed in the actual source itself.
Who is online
Users browsing this forum: No registered users and 58 guests