Fix two scan-build warnings that appear on F41
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 23 Dec 2024 07:13:06 +0000 (17:13 +1000)
committerMarge Bot <emma+marge@anholt.net>
Mon, 23 Dec 2024 07:17:31 +0000 (07:17 +0000)
commitb1f804c5f1c9b215098260d687e8c4131c94fec1
tree629300b6cb3fed0d6c6453a5893fc5634bae59ef
parent117d91b93fe007861d828d7e246aa6cd3e90054d
Fix two scan-build warnings that appear on F41

../../../src/util-files.h:61:3: warning: The 1st argument to 'close' is <= -2 but should be >= -1 [unix.StdCLibraryFunctions]
   61 |                 close(*fd);

 ../../../test/test-quirks.c:66:8: warning: Null pointer passed to 2nd parameter expecting 'nonnull' [core.NonNullParamChecker]
   66 |                 rc = fputs(file_content, fp);

The latter is bogus because we have a litest_assert for this but
somehow this is ignored, so... shrug.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1111>
src/util-files.h
test/test-quirks.c