瀏覽代碼

check_uptime: Fix format-extra-args warning in COPYRIGHT definition.

See,
check_uptime.c: In function ‘print_help’:
utils.h:128:19: warning: too many arguments for format [-Wformat-extra-args]
 #define COPYRIGHT "Copyright (c) %s Nagios Plugin Development Team\n\
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 \t<%s>\n\n"
 ~~~~~~~~~~~
utils.h:128:19: note: in definition of macro ‘COPYRIGHT’
 #define COPYRIGHT "Copyright (c) %s Nagios Plugin Development Team\n\
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 \t<%s>\n\n"
 ~~~~~~~~~~~
Mario Trangoni 7 年之前
父節點
當前提交
60ad427db4
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      plugins/check_uptime.c

+ 4 - 2
plugins/check_uptime.c

@@ -34,7 +34,9 @@ char *progname = "check_uptime";
 char *version = "1.0";
 char *email = "devel@nagios-plugins.org";
 char *copyright = "2014";
-char *developer = "Andy Brist";
+/* There no developer in COPYRIGHT's definition
+ * char *developer = "Andy Brist";
+ */
 
 static int process_arguments (int, char **);
 int validate_arguments (void);
@@ -217,7 +219,7 @@ void print_help (void) {
 
 	print_revision ( progname, NP_VERSION );
 
-	printf ( COPYRIGHT, copyright, developer, email );
+	printf ( COPYRIGHT, copyright, email );
 	printf ( "%s\n", _("This plugin checks the system uptime and alerts if more than the threshold.") );
 	printf ( "%s\n", _("Threshold unit of measurement specified with \"-u\".") );
 	printf ( "%s\n", _("\"-u\" switch supports: seconds|minutes|hours|days.") );