Open fromeijn opened 4 years ago
@fromeijn , can you try initialising the value of request id as 0 (size_t request_id = 0;) on this line: https://github.com/Azure/azure-iot-sdk-c/blob/5d9a19a5e5ce6f4974d333bd28f432ee9284f70b/iothub_client/src/iothubtransport_mqtt_common.c#L1496
yes after applying this it works:
diff --git a/iothub_client/src/iothubtransport_mqtt_common.c b/iothub_client/src/iothubtransport_mqtt_common.c
index 6b5a3ce49..1b4366470 100644
--- a/iothub_client/src/iothubtransport_mqtt_common.c
+++ b/iothub_client/src/iothubtransport_mqtt_common.c
@@ -1493,7 +1493,7 @@ static void mqtt_notification_callback(MQTT_MESSAGE_HANDLE msgHandle, void* call
IOTHUB_IDENTITY_TYPE type = retrieve_topic_type(topic_resp, STRING_c_str(transportData->topic_InputQueue));
if (type == IOTHUB_TYPE_DEVICE_TWIN)
{
- size_t request_id;
+ size_t request_id = 0;
int status_code;
bool notification_msg;
if (parse_device_twin_topic_info(topic_resp, ¬ification_msg, &request_id, &status_code) != 0)
diff --git a/serializer/src/agenttypesystem.c b/serializer/src/agenttypesystem.c
index 06e46e193..c74c5d4c1 100644
--- a/serializer/src/agenttypesystem.c
+++ b/serializer/src/agenttypesystem.c
@@ -3280,7 +3280,7 @@ AGENT_DATA_TYPES_RESULT CreateAgentDataType_From_String(const char* source, AGEN
{
int32_t int32Value;
unsigned char isNegative;
- uint32_t uint32Value;
+ uint32_t uint32Value = 0;
const char* pos;
size_t strLength;
made a quick fix https://github.com/fromeijn/esp-azure
@shahpiyushv : will this be fixed in a future release?
@Lisa999 , the relevant code was from upstream azure-iot-sdk-c and not esp-azure. We haven't explicitly submitted any fix, but have updated azure-iot-sdk-c to a newer LTS release.
While compiling with
Release (-Os)
compiler complains about'request_id' may be used uninitialized
, and i'm unable to build with Release.Debug (-Og)
works tho.ESP-IDF V3.3 0a0f2ca ESP-Azure 6f054a8