diff --git a/features/cellular/framework/AT/AT_CellularDevice.cpp b/features/cellular/framework/AT/AT_CellularDevice.cpp index 8251056328..7b5d249f45 100644 --- a/features/cellular/framework/AT/AT_CellularDevice.cpp +++ b/features/cellular/framework/AT/AT_CellularDevice.cpp @@ -207,7 +207,7 @@ CellularContext *AT_CellularDevice::create_context(FileHandle *fh, const char *a return ctx; } - AT_CellularContext *prev; + AT_CellularContext *prev = NULL; while (curr) { prev = curr; curr = (AT_CellularContext *)curr->_next; diff --git a/features/cellular/framework/AT/AT_CellularSMS.cpp b/features/cellular/framework/AT/AT_CellularSMS.cpp index fe5ff6d7e5..c4e24ced49 100644 --- a/features/cellular/framework/AT/AT_CellularSMS.cpp +++ b/features/cellular/framework/AT/AT_CellularSMS.cpp @@ -990,7 +990,7 @@ void AT_CellularSMS::add_info(sms_info_t *info, int index, int part_number) return; } sms_info_t *current = _sms_info; - sms_info_t *prev; + sms_info_t *prev = NULL; bool found_msg = false; while (current) { prev = current; diff --git a/features/cellular/framework/common/CellularLog.cpp b/features/cellular/framework/common/CellularLog.cpp index 6c96c48cc2..0637865f7e 100644 --- a/features/cellular/framework/common/CellularLog.cpp +++ b/features/cellular/framework/common/CellularLog.cpp @@ -26,10 +26,7 @@ typedef struct trace_s { void (*mutex_release_f)(void); } trace_t; -static trace_t m_trace = { - .mutex_wait_f = 0, - .mutex_release_f = 0, -}; +static trace_t m_trace = {}; void mutex_wait_function_set(void (*mutex_wait_f)(void)) {