]> granicus.if.org Git - procps-ng/commitdiff
slabtop: fix clang complier warnings
authorSami Kerola <kerolasa@iki.fi>
Sun, 26 Feb 2012 11:35:43 +0000 (12:35 +0100)
committerCraig Small <csmall@enc.com.au>
Sat, 3 Mar 2012 07:36:29 +0000 (18:36 +1100)
slabtop.c:273:29: warning: named variadic macros are a GNU extension [-pedantic,-Wvariadic-macros]

slabtop.c:299:9: warning: unused variable 'end' [-Wunused-variable]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
slabtop.c

index e7e7ea8acf03eaf45b3084d20bcba461a45683ea..1a3bbd8ad0174f588c702cb9cd180db268a6a297 100644 (file)
--- a/slabtop.c
+++ b/slabtop.c
@@ -270,7 +270,7 @@ static void parse_input(char c)
        }
 }
 
-#define print_line(fmt, args...) if (run_once) printf(fmt, ## args); else printw(fmt, ## args)
+#define print_line(fmt, ...) if (run_once) printf(fmt, __VA_ARGS__); else printw(fmt, __VA_ARGS__)
 int main(int argc, char *argv[])
 {
        int o;
@@ -296,7 +296,6 @@ int main(int argc, char *argv[])
 
        while ((o = getopt_long(argc, argv, "d:s:ohV", longopts, NULL)) != -1) {
                switch (o) {
-               char *end;
                case 'd':
                        errno = 0;
                        delay = strtol_or_err(optarg, _("illegal delay"));