Pārlūkot izejas kodu

libdpkg: Mark config_error and statusfd_send with DPKG_ATTR_PRINTF

Guillem Jover 16 gadi atpakaļ
vecāks
revīzija
37732b7552
2 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 1 1
      lib/dpkg/dpkg.h
  2. 3 0
      lib/dpkg/myopt.c

+ 1 - 1
lib/dpkg/dpkg.h

@@ -172,7 +172,7 @@ struct pipef {
 };
 extern struct pipef *status_pipes;
 
-void statusfd_send(const char *fmt, ...);
+void statusfd_send(const char *fmt, ...) DPKG_ATTR_PRINTF(1);
 
 /*** cleanup.c ***/
 

+ 3 - 0
lib/dpkg/myopt.c

@@ -48,6 +48,9 @@ badusage(const char *fmt, ...)
   ohshit("%s\n\n%s", buf, gettext(printforhelp));
 }
 
+static void config_error(const char *file_name, int line_num,
+                         const char *fmt, ...) DPKG_ATTR_PRINTF(3);
+
 static void
 config_error(const char *file_name, int line_num, const char *fmt, ...)
 {