diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-11-18 23:06:46 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-11-18 23:07:49 -0800 |
commit | e46b483c58ec3cfc01d2800c069eadc90166eb04 (patch) | |
tree | 8fe7943b856c8acf2f582ea8da13be20d37d85dd | |
parent | 3419c66ac700689351be9fe2bc3f81b80465cd3e (diff) | |
download | xorg-font-util-e46b483c58ec3cfc01d2800c069eadc90166eb04.tar.gz |
Mark usage() as not returning to clear incorrect uninit var warning
bdftruncate.c: In function ‘main’:
bdftruncate.c:119:16: warning: ‘threshold’ may be used uninitialized in this function
(It's not actually, if you consider that usage() exits when
parse_threshold fails.)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | bdftruncate.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bdftruncate.c b/bdftruncate.c index 749869b..2b317c0 100644 --- a/bdftruncate.c +++ b/bdftruncate.c @@ -41,8 +41,15 @@ #include <stdlib.h> #include <string.h> +#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \ + || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) +# define ATTR_NORETURN __attribute((noreturn)) +#else +# define ATTR_NORETURN +#endif /* GNUC */ + static int iswide(unsigned int); -static void usage(void); +static void usage(void) ATTR_NORETURN; static int parse_threshold(const char *str, unsigned long *threshold); static int |