Просмотр исходного кода

check_hpjd.c: fix format warning

check_hpjd.c:125:19: warning: format specifies type 'short' but the argument has
      type 'int' [-Wformat]
  ...address, port, query_string);
              ^~~~
1 warning generated.
Mario Trangoni 7 лет назад
Родитель
Сommit
bbbf942df0
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      plugins/check_hpjd.c

+ 2 - 2
plugins/check_hpjd.c

@@ -121,8 +121,8 @@ main (int argc, char **argv)
 		 HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, HPJD_GD_STATUS_DISPLAY);
 		 HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, HPJD_GD_STATUS_DISPLAY);
 
 
 	/* get the command to run */
 	/* get the command to run */
-	sprintf (command_line, "%s -OQa -m : -v 1 -c %s %s:%hd %s", PATH_TO_SNMPGET, community,
-									address, port, query_string);
+	sprintf (command_line, "%s -OQa -m : -v 1 -c %s %s:%hd %s",
+			PATH_TO_SNMPGET, community, address, (short)port, query_string);
 
 
 	/* run the command */
 	/* run the command */
 	child_process = spopen (command_line);
 	child_process = spopen (command_line);