Skip to content

Commit

Permalink
coverity: pacify test_md5 uninitialized scalar variable warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
philljj committed Mar 9, 2025
1 parent ad8eb76 commit f91f9bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/api/test_digest.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,9 @@ do { \
\
XMEMSET(data, 0xa5, sizeof(data)); \
\
ExpectIntEQ(wc_Init##name(&src), 0); \
XMEMSET(&src, 0, sizeof(src)); \
XMEMSET(&dst, 0, sizeof(dst)); \
ExpectIntEQ(wc_Init##name(&src), 0); \
\
/* Tests bad params. */ \
ExpectIntEQ(wc_##name##Copy(NULL, NULL), WC_NO_ERR_TRACE(BAD_FUNC_ARG)); \
Expand Down Expand Up @@ -513,6 +514,7 @@ do { \
const char* emptyHash = emptyHashStr; \
const char* abcHash = abcHashStr; \
\
XMEMSET(&dgst, 0, sizeof(dgst)); \
ExpectIntEQ(wc_Init##name(&dgst), 0); \
\
ExpectIntEQ(wc_##name##GetHash(NULL, NULL), \
Expand Down Expand Up @@ -657,6 +659,7 @@ do { \
type dgst_copy; \
word32 flags; \
\
XMEMSET(&dgst, 0, sizeof(dgst)); \
XMEMSET(&dgst_copy, 0, sizeof(dgst_copy)); \
ExpectIntEQ(wc_Init##name(&dgst), 0); \
\
Expand Down

0 comments on commit f91f9bf

Please sign in to comment.