sysctl: eliminate some warnings of '-Wunused-variable'
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 75636b79e3d4bd63a04dc6600fe05ffebe0294fc..aa970711f3f5c7be8980dd5f1230c5fd4cbab9b8 100644 (file)
--- a/sysctl.c
+++ b/sysctl.c
@@ -624,7 +624,6 @@ static SysctlSetting *parse_setting_line(
     const int linenum,
     char *line)
 {
-    SysctlSetting *s;
     char *key;
     char *value;
     bool glob_exclude = FALSE;
@@ -680,7 +679,6 @@ static int write_setting_list(const SettingList *sl)
             continue;
 
         if (string_is_glob(node->path)) {
-            char *gl_path;
             glob_t globbuf;
             int i;
 
@@ -726,11 +724,9 @@ static int pattern_match(const char *string, const char *pat)
 static int Preload(SettingList *setlist, const char *restrict const filename)
 {
        FILE *fp;
-       char *t;
        int n = 0;
        int rc = EXIT_SUCCESS;
        ssize_t rlen;
-       char *name, *value;
        glob_t globbuf;
        int globerr;
        int globflg;
@@ -761,7 +757,6 @@ static int Preload(SettingList *setlist, const char *restrict const filename)
                }
 
                while ((rlen =  getline(&iobuf, &iolen, fp)) > 0) {
-                       size_t offset;
             SysctlSetting *setting;
 
                        n++;