]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: pacify GCC when selinux is missing
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 12 May 2025 02:26:38 +0000 (19:26 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 12 May 2025 08:28:48 +0000 (01:28 -0700)
* src/selinux.h (restorecon, defaultcon): Use MAYBE_UNUSED.

src/selinux.h

index 813fa5608980db50a1ae35a83b69551134c631e1..9841d78cc178288acb588a8ba8d9a3302a68ad5f 100644 (file)
@@ -41,13 +41,13 @@ defaultcon (struct selabel_handle *selabel_handle,
 # else
 
 static inline bool
-restorecon (struct selabel_handle *selabel_handle,
-            char const *path, bool recurse)
+restorecon (MAYBE_UNUSED struct selabel_handle *selabel_handle,
+            MAYBE_UNUSED char const *path, MAYBE_UNUSED bool recurse)
 { errno = ENOTSUP; return false; }
 
 static inline int
-defaultcon (struct selabel_handle *selabel_handle,
-            char const *path, mode_t mode)
+defaultcon (MAYBE_UNUSED struct selabel_handle *selabel_handle,
+            MAYBE_UNUSED char const *path, MAYBE_UNUSED mode_t mode)
 { errno = ENOTSUP; return -1; }
 
 # endif