aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/devfsext.h
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1998-07-13 06:45:23 +0000
committerBruce Evans <bde@FreeBSD.org>1998-07-13 06:45:23 +0000
commit748993b899a7e36387ff56306b9abdb34e9643f5 (patch)
treef7dcf65aab82754d2478b110f672c7507c3bdded /sys/sys/devfsext.h
parenteaaeb9f30cc3f373d8628ac4256678577955d1f5 (diff)
downloadsrc-748993b899a7e36387ff56306b9abdb34e9643f5.tar.gz
src-748993b899a7e36387ff56306b9abdb34e9643f5.zip
Added macros __printflike() and __scanflike() to <sys/cdefs.h>.
Use them to `make gcc -Wformat' check formats for all printf-like and scanf-like functions in /usr/src except for the err()/warn() family. err() isn't quite printf-like since its format arg can legitimately be NULL. syslog() isn't quite printf-like, but gcc already accepts %m, even for plain printf() when it shouldn't.
Notes
Notes: svn path=/head/; revision=37614
Diffstat (limited to 'sys/sys/devfsext.h')
-rw-r--r--sys/sys/devfsext.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/sys/devfsext.h b/sys/sys/devfsext.h
index c8052404aebf..3086fba4e92f 100644
--- a/sys/sys/devfsext.h
+++ b/sys/sys/devfsext.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: devfsext.h,v 1.19 1998/04/20 04:55:17 julian Exp $
+ * $Id: devfsext.h,v 1.20 1998/04/28 00:10:52 julian Exp $
*/
#ifndef _SYS_DEVFSEXT_H_
@@ -35,14 +35,15 @@
* and the initial default perms/ownerships.
*/
void *devfs_add_devswf __P((void *devsw, int minor, int chrblk, uid_t uid,
- gid_t gid, int perms, char *fmt, ...));
+ gid_t gid, int perms, char *fmt, ...))
+ __printflike(7, 8);
/*
* Make a link to a device you already made, and have the cookie for
* We get another cookie, but for now, it can be discarded, as
* at the moment there is nothing you can do with it that you couldn't do
* with the original cookie. ( XXX this might be something I should change )
*/
-void *devfs_link __P((void *original, char *fmt, ...));
+void *devfs_link __P((void *original, char *fmt, ...)) __printflike(2, 3);
/*
* Remove all instances of a device you have made. INCLUDING LINKS.