summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-13 12:25:45 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-13 12:25:45 -0800
commit701d5f797a77ba3b3ff2d8c25b7951563d7e4363 (patch)
treee8810b20d2581b97d766f0ec32098dcb37b1a963
parent4b994408d260eb90d8c65739bc3cd6d56037b10a (diff)
Mark Exit() & usage() with _X_NORETURN, cleanup previous workarounds
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--configure.ac2
-rw-r--r--xstdcmap.c10
2 files changed, 3 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index e930a7c..8141908 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,7 +39,7 @@ XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XSTDCMAP, xmu x11)
+PKG_CHECK_MODULES(XSTDCMAP, [xmu x11 xproto >= 7.0.17])
AC_CONFIG_FILES([
Makefile
diff --git a/xstdcmap.c b/xstdcmap.c
index 160754d..0c4c934 100644
--- a/xstdcmap.c
+++ b/xstdcmap.c
@@ -180,7 +180,7 @@ parse(int argc, char **argv)
verbose++;
}
-static void
+static void _X_NORETURN
Exit(Status status)
{
if (dpy)
@@ -188,7 +188,7 @@ Exit(Status status)
exit(status);
}
-static void
+static void _X_NORETURN
usage(Status status)
{
register char **i;
@@ -347,10 +347,6 @@ main(int argc, char *argv[])
if (help) {
usage(0);
- Exit(0);
-
- /* Muffle gcc */
- return 0;
}
if (all) {
@@ -370,6 +366,4 @@ main(int argc, char *argv[])
"Not all new colormap definitions will be retained.\n");
}
Exit((status == 0) ? 1 : 0);
- /* Muffle compiler */
- return 0;
}