diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-08-02 22:22:09 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-08-02 22:32:48 -0700 |
commit | 9e38750da16c6e5bd8bb26b00d74041ddf9be3e8 (patch) | |
tree | b7291a8210501d0d7a567c26542e92462b58aa2c | |
parent | 93f900ceac7ac899e00998adc8782ed02b352930 (diff) |
Add noreturn attributes suggested by gcc
Remove extra bogus return added to avoid warnings when calling Punt()
since gcc didn't know it would never return.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | sxpm/sxpm.c | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index fdf0986..8946550 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,8 @@ AC_CHECK_FUNCS([strlcat]) # Obtain compiler/linker options for dependencies PKG_CHECK_MODULES(XPM, xproto x11) -PKG_CHECK_MODULES(SXPM, x11 xt xext xextproto, build_sxpm=true, build_sxpm=false) +PKG_CHECK_MODULES(SXPM, [x11 xt xext xextproto xproto >= 7.0.17], + [build_sxpm=true], [build_sxpm=false]) AM_CONDITIONAL(BUILD_SXPM, test x$build_sxpm = xtrue) # Internationalization & localization support diff --git a/sxpm/sxpm.c b/sxpm/sxpm.c index a5eaa32..87860c0 100644 --- a/sxpm/sxpm.c +++ b/sxpm/sxpm.c @@ -109,9 +109,9 @@ static char *plaid[] = { #define xrdb XtDatabase(dpy) static Colormap colormap; -void Usage(void); +void Usage(void) _X_NORETURN; void ErrorMessage(int ErrorStatus, const char *tag); -void Punt(int i); +void Punt(int i) _X_NORETURN; void VersionInfo(void); void kinput(Widget widget, char *tag, XEvent *xe, Boolean *b); void GetNumbers(int num, int *format_return, @@ -569,9 +569,6 @@ main( XtMainLoop(); } Punt(0); - - /* Muffle gcc */ - return 0; } void |