-Wall cleanup;

ok sturm@.
This commit is contained in:
xsa 2004-03-03 22:51:00 +00:00
parent f7cb2321af
commit cd0bf6e6d1
4 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-curses_c,v 1.1 2004/03/03 22:51:00 xsa Exp $
--- curses.c.orig 2003-08-13 03:33:02.000000000 +0200
+++ curses.c 2004-03-03 15:50:24.000000000 +0100
@@ -25,6 +25,7 @@
#include <curses.h>
#include <string.h>
#include <stdlib.h>
+#include <term.h>
#ifdef NCURSES_VERSION
# define HAVE_NCURSES

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-game_c,v 1.1 2004/03/03 22:51:00 xsa Exp $
--- game.c.orig 2003-08-13 03:33:02.000000000 +0200
+++ game.c 2004-03-03 15:53:32.000000000 +0100
@@ -58,11 +58,11 @@ ExtFunc void MapKeys(char *newKeys)
ch = (unsigned char) keyTable[k];
if (used[ch]) {
if (iscntrl(ch) && ch < ' ')
- sprintf(scratch, "Ctrl-%c", ch + ('A' - 1));
+ snprintf(scratch, sizeof scratch, "Ctrl-%c", ch + ('A' - 1));
else if (isprint(ch))
- sprintf(scratch, "\"%c\"", ch);
+ snprintf(scratch, sizeof scratch, "\"%c\"", ch);
else
- sprintf(scratch, "0x%X", ch);
+ snprintf(scratch, sizeof scratch, "0x%X", ch);
if (!errs)
fprintf(stderr, "Duplicate key mappings:\n");
errs++;

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-robot_c,v 1.1 2004/03/03 22:51:00 xsa Exp $
--- robot.c.orig 2003-08-13 03:33:02.000000000 +0200
+++ robot.c 2004-03-03 16:03:26.000000000 +0100
@@ -63,7 +63,7 @@ ExtFunc void InitRobot(char *robotProg)
close(to[1]);
close(from[0]);
close(from[1]);
- execl("/bin/sh", "sh", "-c", robotProg, NULL);
+ execl("/bin/sh", "sh", "-c", robotProg, (char *)NULL);
die("execl failed");
}
close(to[0]);

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-util_c,v 1.1 2004/03/03 22:51:00 xsa Exp $
--- util.c.orig 2003-08-13 03:33:02.000000000 +0200
+++ util.c 2004-03-03 15:56:01.000000000 +0100
@@ -35,7 +35,7 @@ static EventGenRec alarmGen =
{ &alarmGen, 0, FT_read, -1, AlarmGenFunc, EM_alarm };
static EventGenRec *nextGen = &alarmGen;
-static myRandSeed = 1;
+static int myRandSeed = 1;
static struct timeval baseTimeval;
@@ -319,7 +319,7 @@ ExtFunc void AddEventGen(EventGenRec *ge
ExtFunc void RemoveEventGen(EventGenRec *gen)
{
- /* assert(gen->next != NULL); /* Be more forgiving, for SIGINTs */
+ /* assert(gen->next != NULL); */ /* Be more forgiving, for SIGINTs */
if (gen->next) {
while (nextGen->next != gen)
nextGen = nextGen->next;