Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #783, Initialize locals flagged in static analysis #784

Merged
merged 1 commit into from
Feb 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/os/shared/src/osapi-idmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ int32 OS_ObjectIdFindNextFree(OS_object_token_t *token)
{
uint32 max_id;
uint32 base_id;
uint32 local_id;
uint32 local_id = 0;
uint32 serial;
uint32 i;
int32 return_code;
Expand Down
4 changes: 2 additions & 2 deletions src/unit-tests/osfile-test/ut_osfile_dirio_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ void UT_os_closedir_test()
**--------------------------------------------------------------------------------*/
void UT_os_readdir_test()
{
osal_id_t dirh;
osal_id_t dirh = OS_OBJECT_ID_UNDEFINED;
const char *testDesc;

strcpy(g_subdirNames[0], " ");
Expand Down Expand Up @@ -566,7 +566,7 @@ void UT_os_readdir_test()
**--------------------------------------------------------------------------------*/
void UT_os_rewinddir_test()
{
osal_id_t dirh;
osal_id_t dirh = OS_OBJECT_ID_UNDEFINED;
const char *testDesc;

strcpy(g_subdirNames[0], " ");
Expand Down
2 changes: 1 addition & 1 deletion src/ut-stubs/osapi-utstub-bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ uint32 OS_BSP_GetArgC(void)
------------------------------------------------------------------*/
char *const *OS_BSP_GetArgV(void)
{
void *buffer;
void *buffer = NULL;
int32 status;

status = UT_DEFAULT_IMPL(OS_BSP_GetArgV);
Expand Down
2 changes: 1 addition & 1 deletion src/ut-stubs/osapi-utstub-idmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ OS_common_record_t *OS_ObjectIdGlobalFromToken(const OS_object_token_t *token)
{
static OS_common_record_t fake_record;
int32 status;
OS_common_record_t * recptr;
OS_common_record_t * recptr = &fake_record;

status = UT_DEFAULT_IMPL(OS_ObjectIdGlobalFromToken);
if (status == 0 &&
Expand Down