Skip to content

Commit 5debb7e

Browse files
authored
Merge pull request #188 from AlexLanzano/clang-tidy-fix
Fix static-analyizer warnings
2 parents f287f2b + bbceeb3 commit 5debb7e

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/wh_server_keystore.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,8 +1181,8 @@ int wh_Server_HandleKeyRequest(whServerContext* server, uint16_t magic,
11811181
}
11821182
} break;
11831183
case WH_KEY_WRAP: {
1184-
whMessageKeystore_WrapRequest wrapReq;
1185-
whMessageKeystore_WrapResponse wrapResp;
1184+
whMessageKeystore_WrapRequest wrapReq = {0};
1185+
whMessageKeystore_WrapResponse wrapResp = {0};
11861186
uint8_t* reqData;
11871187
uint8_t* respData;
11881188
uint32_t reqDataSz = WOLFHSM_CFG_COMM_DATA_LEN - sizeof(wrapReq);
@@ -1217,8 +1217,8 @@ int wh_Server_HandleKeyRequest(whServerContext* server, uint16_t magic,
12171217
} break;
12181218

12191219
case WH_KEY_UNWRAPEXPORT: {
1220-
whMessageKeystore_UnwrapAndExportRequest unwrapReq;
1221-
whMessageKeystore_UnwrapAndExportResponse unwrapResp;
1220+
whMessageKeystore_UnwrapAndExportRequest unwrapReq = {0};
1221+
whMessageKeystore_UnwrapAndExportResponse unwrapResp = {0};
12221222
uint8_t* reqData;
12231223
uint8_t* respData;
12241224
uint32_t reqDataSz = WOLFHSM_CFG_COMM_DATA_LEN - sizeof(unwrapReq);
@@ -1255,8 +1255,8 @@ int wh_Server_HandleKeyRequest(whServerContext* server, uint16_t magic,
12551255
} break;
12561256

12571257
case WH_KEY_UNWRAPCACHE: {
1258-
whMessageKeystore_UnwrapAndCacheRequest cacheReq;
1259-
whMessageKeystore_UnwrapAndCacheResponse cacheResp;
1258+
whMessageKeystore_UnwrapAndCacheRequest cacheReq = {0};
1259+
whMessageKeystore_UnwrapAndCacheResponse cacheResp = {0};
12601260
uint8_t* reqData;
12611261
uint8_t* respData;
12621262
uint32_t reqDataSz = WOLFHSM_CFG_COMM_DATA_LEN - sizeof(cacheReq);

test/wh_test_keywrap.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,5 +200,4 @@ int whTest_KeyWrapClientConfig(whClientConfig* config)
200200
return ret;
201201
}
202202
#endif /* WOLFHSM_CFG_ENABLE_CLIENT */
203-
204203
#endif /* !WOLFHSM_CFG_NO_CRYPTO */

tools/static-analysis/clang-tidy-builder.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)