Fix format string usage

This commit is contained in:
joerg 2011-05-24 12:49:11 +00:00
parent de862ba918
commit 1e608ad53f
2 changed files with 6 additions and 6 deletions

View File

@ -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. * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@ -38,7 +38,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint) #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 #endif
#include <sys/param.h> #include <sys/param.h>
@ -881,7 +881,7 @@ length(type_t *tp, const char *name)
switch (tp->t_tspec) { switch (tp->t_tspec) {
case FUNC: case FUNC:
/* compiler takes size of function */ /* compiler takes size of function */
LERROR(msgs[12]); LERROR("%s", msgs[12]);
/* NOTREACHED */ /* NOTREACHED */
case STRUCT: case STRUCT:
case UNION: case UNION:

View File

@ -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 * Copyright (c) 1994, 1995 Jochen Pohl
@ -37,7 +37,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint) #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 #endif
#include <stdio.h> #include <stdio.h>
@ -131,7 +131,7 @@ mkpos(pos_t *posp)
if (len > blen) if (len > blen)
buf = xrealloc(buf, blen = len); buf = xrealloc(buf, blen = len);
if (line != 0) { if (line != 0) {
(void)sprintf(buf, "%s%s(%hu)", (void)sprintf(buf, "%s%s(%d)",
fn, qm ? "?" : "", line); fn, qm ? "?" : "", line);
} else { } else {
(void)sprintf(buf, "%s", fn); (void)sprintf(buf, "%s", fn);