소스 검색

check_load.c: Fix clang format warning

See,
check_load.c:163:56: warning: format specifies type 'char *' but the argument
      has type 'int' [-Wformat]
  ...printf (_("could not parse load from uptime: %s\n"), result, PATH_TO_UPT...
                                                  ~~      ^~~~~~
                                                  %d
check_load.c:163:64: warning: data argument not used by format string
      [-Wformat-extra-args]
  ...printf (_("could not parse load from uptime: %s\n"), result, PATH_TO_UPT...
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           ^
../config.h:1909:24: note: expanded from macro 'PATH_TO_UPTIME'
                       ^
2 warnings generated.
Mario Trangoni 7 년 전
부모
커밋
09a1cf74d0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      plugins/check_load.c

+ 1 - 1
plugins/check_load.c

@@ -160,7 +160,7 @@ main (int argc, char **argv)
 	    sscanf (input_buffer, "%*[^l]load averages: %lf, %lf, %lf", &la1, &la5, &la15);
 	    sscanf (input_buffer, "%*[^l]load averages: %lf, %lf, %lf", &la1, &la5, &la15);
     }
     }
     else {
     else {
-		printf (_("could not parse load from uptime: %s\n"), result, PATH_TO_UPTIME);
+		printf (_("could not parse load %d from uptime: %s\n"), result, PATH_TO_UPTIME);
 		return STATE_UNKNOWN;
 		return STATE_UNKNOWN;
     }
     }