Pass -Wstrict-overflow

This commit is contained in:
dholland 2012-10-13 21:03:09 +00:00
parent bf33b97c19
commit a59cfd489a

View File

@ -1,4 +1,4 @@
/* $NetBSD: prdata.c,v 1.6 2012/06/19 05:45:00 dholland Exp $ */ /* $NetBSD: prdata.c,v 1.7 2012/10/13 21:03:09 dholland Exp $ */
/*- /*-
* Copyright (c) 1983, 1993 * Copyright (c) 1983, 1993
@ -34,7 +34,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)prdata.c 8.1 (Berkeley) 5/31/93"; static char sccsid[] = "@(#)prdata.c 8.1 (Berkeley) 5/31/93";
#else #else
__RCSID("$NetBSD: prdata.c,v 1.6 2012/06/19 05:45:00 dholland Exp $"); __RCSID("$NetBSD: prdata.c,v 1.7 2012/10/13 21:03:09 dholland Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -47,13 +47,12 @@ __RCSID("$NetBSD: prdata.c,v 1.6 2012/06/19 05:45:00 dholland Exp $");
void void
prdata(void) prdata(void)
{ {
bool *bp; int i;
move(GUESSY, GUESSX + sizeof "Guessed: "); move(GUESSY, GUESSX + sizeof "Guessed: ");
bp = Guessed; for (i = 0; i < 26; i++)
while (bp < &Guessed[26]) if (Guessed[i])
if (*bp++) addch(i + 'a');
addch((bp - Guessed) + 'a' - 1);
clrtoeol(); clrtoeol();
mvprintw(NUMBERY, NUMBERX + sizeof "Word #: ", "%d", Wordnum); mvprintw(NUMBERY, NUMBERX + sizeof "Word #: ", "%d", Wordnum);
mvprintw(AVGY, AVGX + sizeof "Current Average: ", "%.3f", mvprintw(AVGY, AVGX + sizeof "Current Average: ", "%.3f",