]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: silence autological compare warning
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 3 Oct 2024 16:02:45 +0000 (17:02 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Wed, 9 Oct 2024 04:20:32 +0000 (23:20 -0500)
commit98f38c5d80ed639f2c4b7f286cade5fa6a68cdec
tree5bf6cc99ea321f56a02993af65ca61db95cca10f
parent1bbc80d4517adc8cad50a8984a04ea1d9b5ec84c
libkmod: silence autological compare warning

Clang will detect that the enum cannot be zero, thus triggering a
warning. Since this is an external (public API) function, the end-user
can provide any input so we want to keep the check.

Note: include the pragmas in a if defined(__clang__) guard, otherwise
we'll trigger -Wunknown_pragma which will become an error in CI and
developer builds.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/172
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod.c