Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint Fix format string usage
details: https://anonhg.NetBSD.org/src/rev/2b9da167e296
branches: trunk
changeset: 765339:2b9da167e296
user: joerg <joerg%NetBSD.org@localhost>
date: Tue May 24 12:49:11 2011 +0000
description:
Fix format string usage
diffstat:
usr.bin/xlint/lint1/decl.c | 6 +++---
usr.bin/xlint/lint2/msg.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r d64634452ffd -r 2b9da167e296 usr.bin/xlint/lint1/decl.c
--- a/usr.bin/xlint/lint1/decl.c Tue May 24 12:46:16 2011 +0000
+++ b/usr.bin/xlint/lint1/decl.c Tue May 24 12:49:11 2011 +0000
@@ -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:
diff -r d64634452ffd -r 2b9da167e296 usr.bin/xlint/lint2/msg.c
--- a/usr.bin/xlint/lint2/msg.c Tue May 24 12:46:16 2011 +0000
+++ b/usr.bin/xlint/lint2/msg.c Tue May 24 12:49:11 2011 +0000
@@ -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);
Home |
Main Index |
Thread Index |
Old Index