]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
execute: define setup_smack() only if SMACK is enabled
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 5 Dec 2017 05:04:12 +0000 (14:04 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 5 Dec 2017 05:04:15 +0000 (14:04 +0900)
This suppresses the following warning
```
execute.c:2149:12: warning: ‘setup_smack’ defined but not used [-Wunused-function]
 static int setup_smack(
            ^~~~~~~~~~~
```

src/core/execute.c

index 59a8d60fe3e38df7e52d2e5fad162bf871610df5..904082eacdaaa60e3c7440300f3e2487025201b8 100644 (file)
@@ -2146,6 +2146,7 @@ fail:
         return r;
 }
 
+#if ENABLE_SMACK
 static int setup_smack(
                 const ExecContext *context,
                 const ExecCommand *command) {
@@ -2176,6 +2177,7 @@ static int setup_smack(
 
         return 0;
 }
+#endif
 
 static int compile_bind_mounts(
                 const ExecContext *context,