1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

Declare usage() functions as __dead void, if they don't return, on games section.

Found another one in arithmetic(6) which also didn't return, and removed a function from number(6) which is not used anymore.

OK tb@
This commit is contained in:
mestre 2015-12-25 20:59:09 +00:00
parent 3123f67b41
commit f0628b46ae
17 changed files with 35 additions and 36 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: arithmetic.c,v 1.21 2015/10/24 17:13:27 mmcc Exp $ */
/* $OpenBSD: arithmetic.c,v 1.22 2015/12/25 20:59:09 mestre Exp $ */
/*
* Copyright (c) 1989, 1993
@ -71,12 +71,12 @@
#include <unistd.h>
int getrandom(int, int, int);
void intr(int);
__dead void intr(int);
int opnum(int);
void penalise(int, int, int);
int problem(void);
void showstats(void);
void usage(void);
__dead void usage(void);
const char keylist[] = "+-x/";
const char defaultkeys[] = "+-";

View File

@ -1,4 +1,4 @@
/* $OpenBSD: extern.h,v 1.8 2014/12/04 06:12:33 deraadt Exp $ */
/* $OpenBSD: extern.h,v 1.9 2015/12/25 20:59:09 mestre Exp $ */
/* $NetBSD: extern.h,v 1.3 1995/04/24 12:22:37 cgd Exp $ */
/*-
@ -66,5 +66,5 @@ void starttime(void);
void startwords(void);
void stoptime(void);
int timerch(void);
void usage(void);
__dead void usage(void);
int validword(char *);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: factor.c,v 1.22 2015/10/24 17:31:00 mmcc Exp $ */
/* $OpenBSD: factor.c,v 1.23 2015/12/25 20:59:09 mestre Exp $ */
/* $NetBSD: factor.c,v 1.5 1995/03/23 08:28:07 cgd Exp $ */
/*
@ -78,7 +78,7 @@ extern const int pattern_size;
void pr_fact(u_int64_t); /* print factors of a value */
void pr_bigfact(u_int64_t);
void usage(void);
__dead void usage(void);
int
main(int argc, char *argv[])

View File

@ -1,4 +1,4 @@
/* $OpenBSD: fish.c,v 1.18 2015/11/30 08:42:03 tb Exp $ */
/* $OpenBSD: fish.c,v 1.19 2015/12/25 20:59:09 mestre Exp $ */
/* $NetBSD: fish.c,v 1.3 1995/03/23 08:28:18 cgd Exp $ */
/*-
@ -79,7 +79,7 @@ int nrandom(int);
void printhand(const int *);
void printplayer(int);
int promove(void);
void usage(void);
__dead void usage(void);
int usermove(void);
int

View File

@ -1,4 +1,4 @@
/* $OpenBSD: fortune.c,v 1.47 2015/11/10 15:29:11 deraadt Exp $ */
/* $OpenBSD: fortune.c,v 1.48 2015/12/25 20:59:09 mestre Exp $ */
/* $NetBSD: fortune.c,v 1.8 1995/03/23 08:28:40 cgd Exp $ */
/*-
@ -136,7 +136,7 @@ void print_file_list(void);
void print_list(FILEDESC *, int);
void sum_noprobs(FILEDESC *);
void sum_tbl(STRFILE *, STRFILE *);
void usage(void);
__dead void usage(void);
void zero_tbl(STRFILE *);
char *conv_pat(char *);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: strfile.c,v 1.23 2015/10/24 18:33:22 mmcc Exp $ */
/* $OpenBSD: strfile.c,v 1.24 2015/12/25 20:59:09 mestre Exp $ */
/* $NetBSD: strfile.c,v 1.4 1995/04/24 12:23:09 cgd Exp $ */
/*-
@ -114,7 +114,7 @@ void do_order(void);
void getargs(int, char **);
void randomize(void);
char *unctrl(char);
void usage(void);
__dead void usage(void);
/*
* main:

View File

@ -1,4 +1,4 @@
/* $OpenBSD: grdc.c,v 1.21 2015/12/09 02:00:40 jsg Exp $ */
/* $OpenBSD: grdc.c,v 1.22 2015/12/25 20:59:09 mestre Exp $ */
/*
*
* Copyright 2002 Amos Shapir. Public domain.
@ -42,7 +42,7 @@ int hascolor = 0;
void set(int, int);
void standt(int);
void getwinsize(int *, int *);
void usage(void);
__dead void usage(void);
void
sighndl(int signo)

View File

@ -1,4 +1,4 @@
/* $OpenBSD: main.c,v 1.13 2015/10/22 05:28:42 doug Exp $ */
/* $OpenBSD: main.c,v 1.14 2015/12/25 20:59:09 mestre Exp $ */
/* $NetBSD: main.c,v 1.3 1995/03/23 08:32:50 cgd Exp $ */
/*
@ -33,7 +33,7 @@
# include "hangman.h"
#include <paths.h>
void usage();
__dead void usage(void);
/*
* This game written by Ken Arnold.

View File

@ -1,4 +1,4 @@
/* $OpenBSD: number.c,v 1.16 2015/10/24 18:37:23 mmcc Exp $ */
/* $OpenBSD: number.c,v 1.17 2015/12/25 20:59:09 mestre Exp $ */
/*
* Copyright (c) 1988, 1993, 1994
@ -67,9 +67,8 @@ void convert(char *);
void convertexp(char *);
int number(const char *, int);
void pfract(int);
void toobig(void);
int unit(int, const char *);
void usage(void);
__dead void usage(void);
int lflag;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: pig.c,v 1.13 2015/10/24 18:29:15 mmcc Exp $ */
/* $OpenBSD: pig.c,v 1.14 2015/12/25 20:59:09 mestre Exp $ */
/* $NetBSD: pig.c,v 1.2 1995/03/23 08:41:40 cgd Exp $ */
/*-
@ -40,7 +40,7 @@
#include <unistd.h>
void pigout(char *, int);
void usage(void);
__dead void usage(void);
int
main(int argc, char *argv[])

View File

@ -1,4 +1,4 @@
/* $OpenBSD: ppt.c,v 1.13 2015/10/14 08:12:12 doug Exp $ */
/* $OpenBSD: ppt.c,v 1.14 2015/12/25 20:59:09 mestre Exp $ */
/* $NetBSD: ppt.c,v 1.4 1995/03/23 08:35:40 cgd Exp $ */
/*
@ -41,7 +41,7 @@
#define EDGE "___________"
void usage(void);
__dead void usage(void);
void putppt(int);
int getppt(const char *buf);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: primes.c,v 1.18 2015/11/30 08:53:53 tb Exp $ */
/* $OpenBSD: primes.c,v 1.19 2015/12/25 20:59:09 mestre Exp $ */
/* $NetBSD: primes.c,v 1.5 1995/04/24 12:24:47 cgd Exp $ */
/*
@ -93,7 +93,7 @@ extern const int pattern_size; /* length of pattern array */
void primes(ubig, ubig);
ubig read_num_buf(void);
void usage(void);
__dead void usage(void);
int
main(int argc, char *argv[])

View File

@ -1,4 +1,4 @@
/* $OpenBSD: quiz.c,v 1.23 2015/12/06 09:55:58 tb Exp $ */
/* $OpenBSD: quiz.c,v 1.24 2015/12/25 20:59:09 mestre Exp $ */
/* $NetBSD: quiz.c,v 1.9 1995/04/22 10:16:58 cgd Exp $ */
/*-
@ -58,7 +58,7 @@ const char *next_cat(const char *);
void quiz(void);
void score(u_int, u_int, u_int);
void show_index(void);
void usage(void);
__dead void usage(void);
int
main(int argc, char *argv[])

View File

@ -1,4 +1,4 @@
/* $OpenBSD: random.c,v 1.14 2015/11/04 21:22:10 tedu Exp $ */
/* $OpenBSD: random.c,v 1.15 2015/12/25 20:59:09 mestre Exp $ */
/* $NetBSD: random.c,v 1.3 1995/04/22 07:44:05 cgd Exp $ */
/*
@ -45,7 +45,7 @@
#include <unistd.h>
#include <limits.h>
void usage(void);
__dead void usage(void);
int
main(int argc, char *argv[])

View File

@ -1,4 +1,4 @@
/* $OpenBSD: robots.h,v 1.11 2015/12/04 16:40:09 tb Exp $ */
/* $OpenBSD: robots.h,v 1.12 2015/12/25 20:59:09 mestre Exp $ */
/* $NetBSD: robots.h,v 1.5 1995/04/24 12:24:54 cgd Exp $ */
/*
@ -134,4 +134,4 @@ void score(int);
void set_name(SCORE *);
void show_score(void);
int sign(int);
void usage(void);
__dead void usage(void);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: tetris.c,v 1.26 2015/11/20 07:40:23 tb Exp $ */
/* $OpenBSD: tetris.c,v 1.27 2015/12/25 20:59:09 mestre Exp $ */
/* $NetBSD: tetris.c,v 1.2 1995/04/22 07:42:47 cgd Exp $ */
/*-
@ -68,7 +68,7 @@ static void elide(void);
static void setup_board(void);
const struct shape *randshape(void);
void onintr(int);
void usage(void);
__dead void usage(void);
/*
* Set up the initial board. The bottom display row is completely set,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: wump.c,v 1.27 2015/11/30 09:00:02 tb Exp $ */
/* $OpenBSD: wump.c,v 1.28 2015/12/25 20:59:09 mestre Exp $ */
/*
* Copyright (c) 1989, 1993
@ -123,7 +123,7 @@ void pit_survive(void);
int shoot(char *);
void shoot_self(void);
int take_action(void);
void usage(void);
__dead void usage(void);
void wump_kill(void);
void wump_bat_kill(void);
void wump_walk_kill(void);