Uninitialized var request_id causing compiler failure for Release
Posted: Tue Feb 04, 2020 11:05 pm
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!
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!