]> granicus.if.org Git - procps-ng/commitdiff
sysctl: eliminate some warnings of '-Wunused-function'
authorJim Warner <james.warner@comcast.net>
Sun, 2 Jan 2022 06:00:09 +0000 (00:00 -0600)
committerCraig Small <csmall@dropbear.xyz>
Fri, 7 Jan 2022 08:19:15 +0000 (19:19 +1100)
Signed-off-by: Jim Warner <james.warner@comcast.net>
sysctl.c

index aa970711f3f5c7be8980dd5f1230c5fd4cbab9b8..adf0238739c3efdf069354c98a06a86765d47897 100644 (file)
--- a/sysctl.c
+++ b/sysctl.c
@@ -139,6 +139,7 @@ static void slashdot(char *restrict p, char old, char new)
        }
 }
 
+#if 0  // avoid '-Wunused-function' warning
 static void setting_free(SysctlSetting *s) {
     if (!s)
        return;
@@ -148,6 +149,7 @@ static void setting_free(SysctlSetting *s) {
     free(s->value);
     free(s);
 }
+#endif
 
 static SysctlSetting *setting_new(
        const char *key,
@@ -285,6 +287,7 @@ static void rstrip(char *line)
     end[1] = '\0';
 }
 
+#if 0  // avoid '-Wunused-function' warning
 /*
  * Strip the leading and trailing spaces from a string
  */
@@ -308,6 +311,7 @@ static char *StripLeadingAndTrailingSpaces(char *oneline)
 
        return t;
 }
+#endif
 
 /*
  * Read a sysctl setting