Skip to content

Commit 1e7a680

Browse files
authored
initialize event variable. (#299)
* initialize event variable. * another ununitialized variable
1 parent 0b1e06e commit 1e7a680

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

STMicroelectronics/STM32L4_L4+/app/nx_client.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
#include "azure_device_x509_cert_config.h"
2020
#include "azure_pnp_info.h"
2121

22-
#define TELEMETRY_SCRATCH_BUFFER_SIZE 128
23-
#define CALLBACK_SCRATCH_BUFFER_SIZE 128
24-
2522
#define IOT_MODEL_ID "dtmi:azurertos:devkit:gsg;2"
2623

2724
#define TELEMETRY_TEMPERATURE "temperature"

cmake/arm-gcc-cortex-toolchain.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
4848
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
4949
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
5050

51-
set(CMAKE_COMMON_FLAGS "--specs=nano.specs -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin -fshort-enums -Wall -Wextra -Wuninitialized -Wshadow -Wdouble-promotion -Werror -Wno-unused-parameter")
51+
set(CMAKE_COMMON_FLAGS "-g3 --specs=nano.specs -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin -fshort-enums -Wall -Wextra -Wuninitialized -Wshadow -Wdouble-promotion -Werror -Wno-unused-parameter")
5252
set(CMAKE_C_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} ${CMAKE_COMMON_FLAGS}")
5353
set(CMAKE_CXX_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} ${CMAKE_COMMON_FLAGS}")
5454
set(CMAKE_ASM_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS}")
5555
set(CMAKE_EXE_LINKER_FLAGS "${LD_FLAGS} -fno-common -Wl,--gc-sections,-print-memory-usage")
5656

57-
set(CMAKE_C_FLAGS_DEBUG "-O0 -g3")
58-
set(CMAKE_CXX_ASM_FLAGS_DEBUG "-O0 -g3")
59-
set(CMAKE_ASM_FLAGS_DEBUG "-g3")
57+
set(CMAKE_C_FLAGS_DEBUG "-O0")
58+
set(CMAKE_CXX_ASM_FLAGS_DEBUG "-O0")
59+
set(CMAKE_ASM_FLAGS_DEBUG "")
6060

6161
set(CMAKE_C_FLAGS_RELEASE "-Os")
6262
set(CMAKE_CXX_FLAGS_RELEASE "-Os")

shared/src/azure_iot_nx_client.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ static VOID process_writable_properties(AZURE_IOT_NX_CONTEXT* nx_context)
319319

320320
static VOID event_thread(ULONG parameter)
321321
{
322-
ULONG app_events;
322+
ULONG app_events = 0;
323323

324324
AZURE_IOT_NX_CONTEXT* context = (AZURE_IOT_NX_CONTEXT*)parameter;
325325

@@ -800,7 +800,7 @@ UINT azure_iot_nx_client_disconnect(AZURE_IOT_NX_CONTEXT* context)
800800
UINT azure_iot_nx_client_properties_request_and_wait(AZURE_IOT_NX_CONTEXT* context)
801801
{
802802
UINT status;
803-
ULONG app_events;
803+
ULONG app_events = 0;
804804

805805
// Request the properties
806806
if ((status = nx_azure_iot_hub_client_properties_request(&context->iothub_client, NX_WAIT_FOREVER)))

0 commit comments

Comments
 (0)