2026-05-29T16:05:02.6627742Z In file included from ../src/basic/../fundamental/assert-util.h:8,
2026-05-29T16:05:02.6628349Z from ../src/basic/assert-util.h:4,
2026-05-29T16:05:02.6628722Z from ../src/basic/basic-forward.h:17,
2026-05-29T16:05:02.6629044Z from ../src/libsystemd/sd-common/sd-forward.h:6,
2026-05-29T16:05:02.6629361Z from ../src/shared/shared-forward.h:6,
2026-05-29T16:05:02.6629648Z from ../src/shared/crypto-util.h:4,
2026-05-29T16:05:02.6631153Z from ../src/test/test-crypto-util.c:3:
2026-05-29T16:05:02.6634148Z ../src/test/test-crypto-util.c: In function ‘test_digest_size’:
2026-05-29T16:05:02.6634986Z ../src/basic/../fundamental/macro.h:95:41: error: ‘size’ is used uninitialized [-Werror=uninitialized]
2026-05-29T16:05:02.6635470Z 95 | #define _unlikely_(x) (__builtin_expect(!!(x), 0))
2026-05-29T16:05:02.6635764Z | ^~~~~
2026-05-29T16:05:02.6636287Z ../src/basic/../fundamental/assert-util.h:59:21: note: in expansion of macro ‘_unlikely_’
2026-05-29T16:05:02.6636963Z 59 | if (_unlikely_(!(expr))) \
2026-05-29T16:05:02.6637344Z | ^~~~~~~~~~
2026-05-29T16:05:02.6637864Z ../src/basic/../fundamental/assert-util.h:65:25: note: in expansion of macro ‘assert_message_se’
2026-05-29T16:05:02.6638339Z 65 | #define assert_se(expr) assert_message_se(expr, #expr)
2026-05-29T16:05:02.6638642Z | ^~~~~~~~~~~~~~~~~
2026-05-29T16:05:02.6639066Z ../src/test/test-crypto-util.c:136:17: note: in expansion of macro ‘assert_se’
2026-05-29T16:05:02.6639450Z 136 | assert_se(size == t->size);
2026-05-29T16:05:02.6639704Z | ^~~~~~~~~
2026-05-29T16:05:02.6640063Z ../src/test/test-crypto-util.c:132:16: note: ‘size’ declared here
2026-05-29T16:05:02.6640590Z 132 | size_t size;
2026-05-29T16:05:02.6640794Z | ^~~~
};
TEST(digest_size) {
- size_t size;
+ size_t size = 0; /* avoid false maybe-uninitialized warning */
FOREACH_ELEMENT(t, digest_size_table) {
assert(openssl_digest_size(t->alg, &size) >= 0);