fix some lint

This commit is contained in:
christos 2008-02-24 03:56:48 +00:00
parent 7cafbb8e59
commit dc11f84d61
5 changed files with 18 additions and 23 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cards.c,v 1.22 2008/02/24 02:43:18 dholland Exp $ */
/* $NetBSD: cards.c,v 1.23 2008/02/24 03:56:48 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)cards.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: cards.c,v 1.22 2008/02/24 02:43:18 dholland Exp $");
__RCSID("$NetBSD: cards.c,v 1.23 2008/02/24 03:56:48 christos Exp $");
#endif
#endif /* not lint */
@ -210,7 +210,7 @@ set_up(dp)
int r1, r2;
int i;
dp->cards = calloc(dp->num_cards, sizeof(dp->cards[0]));
dp->cards = calloc((size_t)dp->num_cards, sizeof(dp->cards[0]));
if (dp->cards == NULL)
errx(1, "out of memory");
@ -365,7 +365,7 @@ ret_card(plr)
int gojfpos, last_card;
int i;
DECK *dp;
off_t temp;
int temp;
plr->num_gojf--;
if (CC_D.gojf_used)

View File

@ -1,4 +1,4 @@
/* $NetBSD: execute.c,v 1.18 2008/02/24 02:43:18 dholland Exp $ */
/* $NetBSD: execute.c,v 1.19 2008/02/24 03:56:48 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)execute.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: execute.c,v 1.18 2008/02/24 02:43:18 dholland Exp $");
__RCSID("$NetBSD: execute.c,v 1.19 2008/02/24 03:56:48 christos Exp $");
#endif
#endif /* not lint */
@ -426,7 +426,7 @@ static enum {
RI_NONE,
RI_PLAYER,
RI_DECK,
RI_SQUARE,
RI_SQUARE
} restore_item;
static int restore_itemnum;
@ -525,7 +525,7 @@ restore_toplevel_attr(const char *attribute, char *txt)
printf("numplayers: multiple settings\n");
return -1;
}
play = calloc(num_play, sizeof(play[0]));
play = calloc((size_t)num_play, sizeof(play[0]));
if (play == NULL) {
err(1, "calloc");
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: monop.c,v 1.21 2008/02/24 01:57:34 dholland Exp $ */
/* $NetBSD: monop.c,v 1.22 2008/02/24 03:56:49 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
#if 0
static char sccsid[] = "@(#)monop.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: monop.c,v 1.21 2008/02/24 01:57:34 dholland Exp $");
__RCSID("$NetBSD: monop.c,v 1.22 2008/02/24 03:56:49 christos Exp $");
#endif
#endif /* not lint */
@ -230,7 +230,7 @@ main(ac, av)
/* Revoke setgid privileges */
setgid(getgid());
srandom(time(NULL));
srandom((unsigned long)time(NULL));
num_luck = sizeof lucky_mes / sizeof (char *);
init_decks();
init_monops();
@ -278,7 +278,7 @@ blew_it:
else
break;
}
cur_p = play = (PLAY *) calloc(num_play, sizeof (PLAY));
cur_p = play = calloc((size_t)num_play, sizeof (PLAY));
if (play == NULL)
err(1, NULL);
for (i = 0; i < num_play; i++) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: print.c,v 1.11 2008/02/24 01:57:34 dholland Exp $ */
/* $NetBSD: print.c,v 1.12 2008/02/24 03:56:49 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: print.c,v 1.11 2008/02/24 01:57:34 dholland Exp $");
__RCSID("$NetBSD: print.c,v 1.12 2008/02/24 03:56:49 christos Exp $");
#endif
#endif /* not lint */
@ -82,9 +82,7 @@ where()
* This routine prints out an individual square
*/
void
printsq(sqn, eoln)
int sqn;
bool eoln;
printsq(int sqn, bool eoln)
{
int rnt;
PROP *pp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: prop.c,v 1.17 2008/02/24 01:57:34 dholland Exp $ */
/* $NetBSD: prop.c,v 1.18 2008/02/24 03:56:49 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)prop.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: prop.c,v 1.17 2008/02/24 01:57:34 dholland Exp $");
__RCSID("$NetBSD: prop.c,v 1.18 2008/02/24 03:56:49 christos Exp $");
#endif
#endif /* not lint */
@ -97,10 +97,7 @@ add_list(plr, head, op_sqr)
* This routine deletes property from the list.
*/
void
del_list(plr, head, op_sqr)
int plr;
OWN **head;
short op_sqr;
del_list(int plr, OWN **head, short op_sqr)
{
OWN *op, *last_op;