From a5e6526bbc7cbbc9198506e064990429d43cad5f Mon Sep 17 00:00:00 2001 From: joerg Date: Thu, 12 Nov 2020 22:23:16 +0000 Subject: [PATCH] Avoid common symbols. Use __dead. --- games/warp/intrp.c | 2 +- games/warp/score.h | 2 +- games/warp/sig.h | 4 ++-- games/warp/util.c | 2 ++ games/warp/util.h | 6 +++--- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/games/warp/intrp.c b/games/warp/intrp.c index 2b6df8250d3b..e3f615b0af5f 100644 --- a/games/warp/intrp.c +++ b/games/warp/intrp.c @@ -32,7 +32,7 @@ static char *getrealname(uid_t); static char *skipinterp(const char *, const char *); #endif -static void abort_interp(void); +__dead static void abort_interp(void); void intrp_init(char *tcbuf) diff --git a/games/warp/score.h b/games/warp/score.h index c3810c049d2c..a47521f071f3 100644 --- a/games/warp/score.h +++ b/games/warp/score.h @@ -42,7 +42,7 @@ EXT char longlognam[128]; EXT char c INIT(' '); void score_init(void); -void wscore(void); +__dead void wscore(void); void display_status(void); void wavescore(void); void score(void); diff --git a/games/warp/sig.h b/games/warp/sig.h index 8f60329e6585..fe22220c0785 100644 --- a/games/warp/sig.h +++ b/games/warp/sig.h @@ -8,8 +8,8 @@ void sig_init(void); void mytstp(void); -void finalize(int status); -void sig_catcher(int signo); +__dead void finalize(int status); +__dead void sig_catcher(int signo); #ifdef SIGTSTP void cont_catcher(int x); void stop_catcher(int sig); diff --git a/games/warp/util.c b/games/warp/util.c index 76cc4dc77055..2b5a638f7fd5 100644 --- a/games/warp/util.c +++ b/games/warp/util.c @@ -21,6 +21,8 @@ #include "INTERN.h" #include "util.h" +struct timespec timebuf; + void util_init(void) { diff --git a/games/warp/util.h b/games/warp/util.h index 444e08665d07..ba7dbe3d352a 100644 --- a/games/warp/util.h +++ b/games/warp/util.h @@ -17,7 +17,7 @@ /* we get fractions of seconds from calling ftime on timebuf */ -EXT struct timespec timebuf; +extern struct timespec timebuf; #define roundsleep(x) (clock_gettime(CLOCK_REALTIME, &timebuf),sleep(timebuf.tv_nsec > 5000000000 ?x+1:x)) #define waiting 0 @@ -37,7 +37,7 @@ EXT int len_last_line_got INIT(0); void util_init(void); void movc3(int, char *, char *); -void no_can_do(const char *); +__dead void no_can_do(const char *); int exdis(int); void *safemalloc(size_t size); char *safecpy(char *, const char *, size_t); @@ -46,6 +46,6 @@ char *instr(const char *, const char *); #ifdef SETUIDGID int eaccess(const char *, mode_t); #endif -void prexit(const char *); +__dead void prexit(const char *); char *savestr(const char *); char *getval(const char *, const char *);