]> git.ipfire.org Git - thirdparty/systemd.git/commit
various: do not use assert_se as a workaround in non-test code
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 29 Apr 2025 10:49:54 +0000 (12:49 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 29 Apr 2025 12:59:32 +0000 (21:59 +0900)
commit7dcbb48e4692f69a1d772cb1596417d73f232a95
treefbb6bfd2310759da764b9ca80ffb307193c139e6
parentbd4ab24f495676b46ff3f65e758e47912a83227f
various: do not use assert_se as a workaround in non-test code

This partially reverts 5332be60d3897c7b86d28cf7b9d61c5dc6847fd6. I expect that
there is no practical difference, but it seems philosophically wrong to use
assert_se(), i.e. for the generation of the code in non-debug builds, just to
suppress a warning. We have _unused_ for that, use it.

I verified that we don't get warnings with clang and -DNDEBUG=1 with this patch.
src/libsystemd-network/sd-ndisc-router-solicit.c
src/login/logind-dbus.c
src/shared/tpm2-util.c