Module Name:    src
Committed By:   joerg
Date:           Tue Jan  7 02:12:07 UTC 2014

Modified Files:
        src/external/bsd/file/dist/src: file.h funcs.c

Log Message:
Format string checks for file_vprintf and file_error_core


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/file/dist/src/file.h
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/file/dist/src/funcs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/file/dist/src/file.h
diff -u src/external/bsd/file/dist/src/file.h:1.9 src/external/bsd/file/dist/src/file.h:1.10
--- src/external/bsd/file/dist/src/file.h:1.9	Sun Dec  1 19:32:15 2013
+++ src/external/bsd/file/dist/src/file.h	Tue Jan  7 02:12:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: file.h,v 1.9 2013/12/01 19:32:15 christos Exp $	*/
+/*	$NetBSD: file.h,v 1.10 2014/01/07 02:12:07 joerg Exp $	*/
 
 /*
  * Copyright (c) Ian F. Darwin 1986-1995.
@@ -417,7 +417,8 @@ protected int file_buffer(struct magic_s
     size_t);
 protected int file_fsmagic(struct magic_set *, const char *, struct stat *);
 protected int file_pipe2file(struct magic_set *, int, const void *, size_t);
-protected int file_vprintf(struct magic_set *, const char *, va_list);
+protected int file_vprintf(struct magic_set *, const char *, va_list)
+    __attribute__((__format__(__printf__, 2, 0)));
 protected size_t file_printedlen(const struct magic_set *);
 protected int file_replace(struct magic_set *, const char *, const char *);
 protected int file_printf(struct magic_set *, const char *, ...)

Index: src/external/bsd/file/dist/src/funcs.c
diff -u src/external/bsd/file/dist/src/funcs.c:1.6 src/external/bsd/file/dist/src/funcs.c:1.7
--- src/external/bsd/file/dist/src/funcs.c:1.6	Sun Dec  1 19:32:15 2013
+++ src/external/bsd/file/dist/src/funcs.c	Tue Jan  7 02:12:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: funcs.c,v 1.6 2013/12/01 19:32:15 christos Exp $	*/
+/*	$NetBSD: funcs.c,v 1.7 2014/01/07 02:12:07 joerg Exp $	*/
 
 /*
  * Copyright (c) Christos Zoulas 2003.
@@ -32,7 +32,7 @@
 #if 0
 FILE_RCSID("@(#)$File: funcs.c,v 1.64 2013/11/19 23:49:44 christos Exp $")
 #else
-__RCSID("$NetBSD: funcs.c,v 1.6 2013/12/01 19:32:15 christos Exp $");
+__RCSID("$NetBSD: funcs.c,v 1.7 2014/01/07 02:12:07 joerg Exp $");
 #endif
 #endif	/* lint */
 
@@ -101,6 +101,7 @@ file_printf(struct magic_set *ms, const 
  * error - print best error message possible
  */
 /*VARARGS*/
+__attribute__((__format__(__printf__, 3, 0)))
 private void
 file_error_core(struct magic_set *ms, int error, const char *f, va_list va,
     size_t lineno)

Reply via email to