Module Name:    src
Committed By:   joerg
Date:           Tue May 24 12:49:11 UTC 2011

Modified Files:
        src/usr.bin/xlint/lint1: decl.c
        src/usr.bin/xlint/lint2: msg.c

Log Message:
Fix format string usage


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/xlint/lint2/msg.c

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

Modified files:

Index: src/usr.bin/xlint/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.51 src/usr.bin/xlint/lint1/decl.c:1.52
--- src/usr.bin/xlint/lint1/decl.c:1.51	Fri Oct  2 21:49:30 2009
+++ src/usr.bin/xlint/lint1/decl.c	Tue May 24 12:49:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.51 2009/10/02 21:49:30 christos Exp $ */
+/* $NetBSD: decl.c,v 1.52 2011/05/24 12:49:11 joerg Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: decl.c,v 1.51 2009/10/02 21:49:30 christos Exp $");
+__RCSID("$NetBSD: decl.c,v 1.52 2011/05/24 12:49:11 joerg Exp $");
 #endif
 
 #include <sys/param.h>
@@ -881,7 +881,7 @@
 	switch (tp->t_tspec) {
 	case FUNC:
 		/* compiler takes size of function */
-		LERROR(msgs[12]);
+		LERROR("%s", msgs[12]);
 		/* NOTREACHED */
 	case STRUCT:
 	case UNION:

Index: src/usr.bin/xlint/lint2/msg.c
diff -u src/usr.bin/xlint/lint2/msg.c:1.10 src/usr.bin/xlint/lint2/msg.c:1.11
--- src/usr.bin/xlint/lint2/msg.c:1.10	Sat Apr 26 19:38:30 2008
+++ src/usr.bin/xlint/lint2/msg.c	Tue May 24 12:49:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.c,v 1.10 2008/04/26 19:38:30 christos Exp $	*/
+/*	$NetBSD: msg.c,v 1.11 2011/05/24 12:49:11 joerg Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: msg.c,v 1.10 2008/04/26 19:38:30 christos Exp $");
+__RCSID("$NetBSD: msg.c,v 1.11 2011/05/24 12:49:11 joerg Exp $");
 #endif
 
 #include <stdio.h>
@@ -131,7 +131,7 @@
 	if (len > blen)
 		buf = xrealloc(buf, blen = len);
 	if (line != 0) {
-		(void)sprintf(buf, "%s%s(%hu)",
+		(void)sprintf(buf, "%s%s(%d)",
 			      fn, qm ? "?" : "", line);
 	} else {
 		(void)sprintf(buf, "%s", fn);

Reply via email to