]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/: Use non-empty compound literals
authorAlejandro Colomar <alx@kernel.org>
Tue, 30 Dec 2025 15:17:55 +0000 (16:17 +0100)
committerSerge Hallyn <serge@hallyn.com>
Tue, 30 Dec 2025 16:07:45 +0000 (10:07 -0600)
commit9214a8e44d805087dd6ba86bacc1e7970d3bf0f2
tree07b44b4481970db4b731fb8197610ce559ca5875
parenteef769836f2c757fc120b6c2ac0a684058c4f28a
lib/: Use non-empty compound literals

While the empty one is more correct, {0} will also work, and will
likely silence diagnostics in old compiler versions.

Empty compound literals are only supported in GCC since commit
gcc.git 14cfa01755a6 (2022-08-25; "c: Support C2x empty initializer braces")

Reported-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/atoi/a2i.h
lib/search/cmp/cmp.h
lib/sizeof.h
lib/typetraits.h