From ee73b13b1459785a9a74044efcce9ce88ec33c3b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 30 Apr 2009 09:02:25 +0200 Subject: build: suppress more warnings * src/fid.c (usage): Declare with __noreturn__ attribute. * src/fnid.c (usage): Likewise. * src/lid.c (usage): Likewise. * src/mkid.c (usage): Likewise. * src/xtokid.c: (usage): Likewise. * src/mkid.c (sum_files): Remove unused macro. --- src/fid.c | 4 ++-- src/fnid.c | 5 ++--- src/lid.c | 2 +- src/mkid.c | 4 ++-- src/xtokid.c | 4 ++-- 5 files changed, 9 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/fid.c b/src/fid.c index 9fe583b..50dc9ac 100644 --- a/src/fid.c +++ b/src/fid.c @@ -1,5 +1,5 @@ /* fid.c -- list all tokens in the given file(s) - Copyright (C) 1986, 1995, 1996, 2008 Free Software Foundation, Inc. + Copyright (C) 1986, 1995, 1996, 2008, 2009 Free Software Foundation, Inc. Written by Greg McGary This program is free software; you can redistribute it and/or modify @@ -38,7 +38,7 @@ static int get_file_index (char *file_name); static int is_hit (unsigned char const *hits, int file_number); static int is_hit_1 (unsigned char const **hits, int level, int file_number); static void skip_hits (unsigned char const **hits, int level); -void usage (void); +void usage (void) __attribute__((__noreturn__)); struct idhead idh; static int tree8_levels; diff --git a/src/fnid.c b/src/fnid.c index c8b0177..ddee2ec 100644 --- a/src/fnid.c +++ b/src/fnid.c @@ -1,5 +1,5 @@ /* fnid.c -- report which files constitute an ID database - Copyright (C) 1996, 2008 Free Software Foundation, Inc. + Copyright (C) 1996, 2008, 2009 Free Software Foundation, Inc. Written by Greg McGary This program is free software; you can redistribute it and/or modify @@ -34,8 +34,6 @@ #include "iduglobal.h" #include "progname.h" -void usage (void); - static int show_version = 0; static int show_help = 0; static struct file_link *cw_dlink; @@ -46,6 +44,7 @@ struct idhead idh; static enum separator_style separator_style = ss_contextual; +void usage (void) __attribute__((__noreturn__)); void usage (void) { diff --git a/src/lid.c b/src/lid.c index f4e23b9..5519109 100644 --- a/src/lid.c +++ b/src/lid.c @@ -93,7 +93,7 @@ enum radix radix_all = radix_dec | radix_oct | radix_hex }; -void usage (void); +void usage (void) __attribute__((__noreturn__)); static void help_me (void); static void lower_caseify (char *str); static enum key_style parse_key_style (char const *arg); diff --git a/src/mkid.c b/src/mkid.c index f2f28ee..0090fdc 100644 --- a/src/mkid.c +++ b/src/mkid.c @@ -1,5 +1,5 @@ /* mkid.c -- build an identifer database - Copyright (C) 1986, 1995, 1996, 1999, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 1986, 1995, 1996, 1999, 2007-2009 Free Software Foundation, Inc. Written by Greg McGary This program is free software; you can redistribute it and/or modify @@ -51,7 +51,6 @@ struct summary struct summary *u_kids[8]; /* when sum_level > 0 */ #define sum_kids sum_u.u_kids struct member_file *u_files[8]; /* when sum_level == 0 */ -#define sum_files sum_u.u_files } sum_u; unsigned long sum_tokens_size; unsigned long sum_hits_count; @@ -120,6 +119,7 @@ static int show_help = 0; struct idhead idh; static struct file_link *cw_dlink; +void usage (void) __attribute__((__noreturn__)); void usage (void) { diff --git a/src/xtokid.c b/src/xtokid.c index c45d5be..8f77980 100644 --- a/src/xtokid.c +++ b/src/xtokid.c @@ -1,5 +1,5 @@ /* idx.c -- simple interface for testing scanners scanners - Copyright (C) 1986, 1995, 1996, 1999, 2007-2008 Free Software Foundation, Inc. + Copyright (C) 1986, 1995, 1996, 1999, 2007-2009 Free Software Foundation, Inc. Written by Greg McGary This program is free software; you can redistribute it and/or modify @@ -35,7 +35,7 @@ static void scan_files (struct idhead *idhp); static void scan_member_file (struct member_file const *member); -void usage (void); +void usage (void) __attribute__((__noreturn__)); static char *lang_map_file_name = 0; static int show_version = 0; -- cgit v1.2.3