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

Add missing PRINTFFORMAT attribute to few function declarations

Guillem Jover лет назад: 18
Родитель
Сommit
c04a83af4a
3 измененных файлов с 22 добавлено и 8 удалено
  1. 11 0
      ChangeLog
  2. 1 1
      lib/dpkg-db.h
  3. 10 7
      lib/dpkg.h

+ 11 - 0
ChangeLog

@@ -1,3 +1,14 @@
+2008-01-02  Guillem Jover  <guillem@debian.org>
+
+	* lib/dpkg.h (warningf): Add PRINTFFORMAT attribute.
+	(buffer_copy_setup_PtrInt): Likewise.
+	(buffer_copy_setup_PtrPtr): Likewise.
+	(buffer_copy_setup_IntPtr): Likewise.
+	(buffer_copy_setup_IntInt): Likewise.
+	(decompress_cat): Likewise.
+	(compress_cat): Likewise.
+	* lib/dpkg-db.h (log_message): Likewise.
+
 2008-01-02  Guillem Jover  <guillem@debian.org>
 
 	* lib/dpkg.h (NONRETURNPRINTFFORMAT): Remove macro.

+ 1 - 1
lib/dpkg-db.h

@@ -175,7 +175,7 @@ void modstatdb_shutdown(void);
 extern char *statusfile, *availablefile; /* initialised by modstatdb_init */
 
 extern const char *log_file;
-void log_message(const char *fmt, ...);
+void log_message(const char *fmt, ...) PRINTFFORMAT(1, 2);
 
 /*** from database.c ***/
 

+ 10 - 7
lib/dpkg.h

@@ -215,7 +215,7 @@ void ohshite(const char *fmt, ...) NONRETURNING PRINTFFORMAT(1, 2);
 void ohshitvb(struct varbuf*) NONRETURNING;
 void badusage(const char *fmt, ...) NONRETURNING PRINTFFORMAT(1, 2);
 void werr(const char *what) NONRETURNING;
-void warningf(const char *fmt, ...);
+void warningf(const char *fmt, ...) PRINTFFORMAT(1, 2);
 
 /*** from mlib.c ***/
 
@@ -341,16 +341,16 @@ struct buffer_data {
 
 off_t buffer_copy_setup_PtrInt(void *p, int typeIn, void *procIn,
 					int i, int typeOut, void *procOut,
-					off_t limit, const char *desc, ...);
+					off_t limit, const char *desc, ...) PRINTFFORMAT(8, 9);
 off_t buffer_copy_setup_PtrPtr(void *p1, int typeIn, void *procIn,
 					void *p2, int typeOut, void *procOut,
-					off_t limit, const char *desc, ...);
+					off_t limit, const char *desc, ...) PRINTFFORMAT(8, 9);
 off_t buffer_copy_setup_IntPtr(int i, int typeIn, void *procIn,
 					void *p, int typeOut, void *procOut,
-					off_t limit, const char *desc, ...);
+					off_t limit, const char *desc, ...) PRINTFFORMAT(8, 9);
 off_t buffer_copy_setup_IntInt(int i1, int typeIn, void *procIn,
 					int i2, int typeOut, void *procOut,
-					off_t limit, const char *desc, ...);
+					off_t limit, const char *desc, ...) PRINTFFORMAT(8, 9);
 off_t buffer_copy_setup(buffer_arg argIn, int typeIn, void *procIn,
 		       buffer_arg argOut, int typeOut, void *procOut,
 		       off_t limit, const char *desc);
@@ -379,8 +379,11 @@ enum compress_type {
   compress_type_lzma,
 };
 
-void decompress_cat(enum compress_type type, int fd_in, int fd_out, char *desc, ...) NONRETURNING;
-void compress_cat(enum compress_type type, int fd_in, int fd_out, const char *compression, char *desc, ...) NONRETURNING;
+void decompress_cat(enum compress_type type, int fd_in, int fd_out,
+                    char *desc, ...) NONRETURNING PRINTFFORMAT(4, 5);
+void compress_cat(enum compress_type type, int fd_in, int fd_out,
+                  const char *compression, char *desc, ...)
+                  NONRETURNING PRINTFFORMAT(5, 6);
 
 /*** from compat.c ***/