summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-05-08 09:48:55 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-05-08 09:49:20 -0700
commit05c9c12b6491708bc9ed9ea6b7a5321928d5ac93 (patch)
treef7ba99cda9e359e83c96bb0204121c931c1f4338
parentb7751c561e500e066273d618bfb9967b89767559 (diff)
Mark Error as _X_NORETURN
xwud.c:1031:6: warning: Array access (from variable 'pixels') results in a null pointer dereference pixels[i] = ~0L; ^~~~~~ xwud.c:1036:22: warning: Array access (from variable 'pixels') results in a null pointer dereference if ((color.pixel = pixels[pix]) == ~0L) { ^~~~~~ xwud.c:1101:6: warning: Array access (from variable 'rpixels') results in a null pointer dereference rpixels[i] = ~0L; ^~~~~~~ xwud.c:1100:6: warning: Array access (from variable 'pixels') results in a null pointer dereference pixels[i] = ~0L; ^~~~~~ Found-by: clang static analyzer Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r--configure.ac2
-rw-r--r--xwud.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 3d5da82..f370762 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(XWUD, x11)
+PKG_CHECK_MODULES(XWUD, x11 xproto >= 7.0.17)
AC_CONFIG_FILES([
Makefile
diff --git a/xwud.c b/xwud.c
index 134f062..0625f3a 100644
--- a/xwud.c
+++ b/xwud.c
@@ -70,7 +70,7 @@ static void Do_Direct(Display *dpy, XWDFileHeader *header, Colormap *colormap,
int ncolors, XColor *colors,
XImage *in_image, XImage *out_image, XVisualInfo *vinfo);
static unsigned int Image_Size(XImage *image);
-static void Error(char *string);
+static void Error(char *string) _X_NORETURN;
static void _swapshort(char *bp, unsigned int n);
static void _swaplong(char *bp, unsigned int n);
static void DumpHeader(const XWDFileHeader *header, const char *win_name);