From 68441b90e90d2d57b6755aa45559ca22dda8d04c Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Sat, 24 Jul 2010 10:18:18 -0700 Subject: [PATCH] Add NO_RETURN specifiers to functions in lib-src. * lib-src/update-game-score.c (usage): Add NO_RETURN specifier. * lib-src/movemail.c (fatal, pfatal_with_name, pfatal_and_delete): * lib-src/make-docfile.c (fatal): * lib-src/hexl.c (usage): * lib-src/fakemail.c (fatal): * lib-src/etags.c (fatal, suggest_asking_for_help, pfatal): * lib-src/emacsclient.c (fatal): * lib-src/b2m.c (fatal): Likewise. --- lib-src/ChangeLog | 11 +++++++++++ lib-src/b2m.c | 2 +- lib-src/emacsclient.c | 2 ++ lib-src/etags.c | 6 +++--- lib-src/fakemail.c | 2 ++ lib-src/hexl.c | 2 +- lib-src/make-docfile.c | 1 + lib-src/movemail.c | 6 +++--- lib-src/update-game-score.c | 2 ++ 9 files changed, 26 insertions(+), 8 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 249dfa44fa4..50184ee58ad 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,14 @@ +2010-07-24 Dan Nicolaescu + + * update-game-score.c (usage): Add NO_RETURN specifier. + * movemail.c (fatal, pfatal_with_name, pfatal_and_delete): + * make-docfile.c (fatal): + * hexl.c (usage): + * fakemail.c (fatal): + * etags.c (fatal, suggest_asking_for_help, pfatal): + * emacsclient.c (fatal): + * b2m.c (fatal): Likewise. + 2010-07-23 Juanma Barranquero * make-docfile.c (write_c_args): Correctly handle prefixes of "defalt". diff --git a/lib-src/b2m.c b/lib-src/b2m.c index 733cd276653..f31b33f9780 100644 --- a/lib-src/b2m.c +++ b/lib-src/b2m.c @@ -70,7 +70,7 @@ long *xmalloc (unsigned int size); long *xrealloc (char *ptr, unsigned int size); char *concat (char *s1, char *s2, char *s3); long readline (struct linebuffer *linebuffer, register FILE *stream); -void fatal (char *message); +void fatal (char *message) NO_RETURN; /* * xnew -- allocate storage. SYNOPSIS: Type *xnew (int n, Type); diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index bafc7e02720..cbf988348dd 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -158,6 +158,8 @@ char *server_file = NULL; int emacs_pid = 0; void print_help_and_exit (void) NO_RETURN; +void fail (void) NO_RETURN; + struct option longopts[] = { diff --git a/lib-src/etags.c b/lib-src/etags.c index 79475fe9922..b78686dde57 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -406,9 +406,9 @@ static void analyse_regex (char *); static void free_regexps (void); static void regex_tag_multiline (void); static void error (const char *, const char *); -static void suggest_asking_for_help (void); -void fatal (char *, char *); -static void pfatal (char *); +static void suggest_asking_for_help (void) NO_RETURN; +void fatal (char *, char *) NO_RETURN; +static void pfatal (char *) NO_RETURN; static void add_node (node *, node **); static void init (void); diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c index f4d978b7d11..72e1b7179c0 100644 --- a/lib-src/fakemail.c +++ b/lib-src/fakemail.c @@ -147,6 +147,8 @@ static line_list file_preface; static stream_list the_streams; static boolean no_problems = true; +static void fatal (char *s1) NO_RETURN; + extern FILE *popen (const char *, const char *); extern int fclose (FILE *), pclose (FILE *); diff --git a/lib-src/hexl.c b/lib-src/hexl.c index d730cac6814..b31ab812534 100644 --- a/lib-src/hexl.c +++ b/lib-src/hexl.c @@ -49,7 +49,7 @@ int base = DEFAULT_BASE, un_flag = FALSE, iso_flag = FALSE, endian = 1; int group_by = DEFAULT_GROUPING; char *progname; -void usage(void); +void usage(void) NO_RETURN; int main (int argc, char **argv) diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 0b03b5e259d..4b5012902a0 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -70,6 +70,7 @@ along with GNU Emacs. If not, see . */ int scan_file (char *filename); int scan_lisp_file (char *filename, char *mode); int scan_c_file (char *filename, char *mode); +void fatal (char *s1, char *s2) NO_RETURN; #ifdef MSDOS /* s/msdos.h defines this as sys_chdir, but we're not linking with the diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 541edf545df..bb4a922014c 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -147,10 +147,10 @@ static char *mail_spool_name (); char *strerror (int); #endif -static void fatal (char *s1, char *s2, char *s3); +static void fatal (char *s1, char *s2, char *s3) NO_RETURN; static void error (char *s1, char *s2, char *s3); -static void pfatal_with_name (char *name); -static void pfatal_and_delete (char *name); +static void pfatal_with_name (char *name) NO_RETURN; +static void pfatal_and_delete (char *name) NO_RETURN; static char *concat (char *s1, char *s2, char *s3); static long *xmalloc (unsigned int size); #ifdef MAIL_USE_POP diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index a96422a09a9..30208d5c8d2 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c @@ -60,6 +60,8 @@ along with GNU Emacs. If not, see . */ extern char *optarg; extern int optind, opterr; +int usage (int err) NO_RETURN; + #define MAX_ATTEMPTS 5 #define MAX_SCORES 200 #define MAX_DATA_LEN 1024 -- 2.39.2