From 4c2b76d7e51c9c28839c281579b5679c2476611f Mon Sep 17 00:00:00 2001 From: marino Date: Sat, 18 Aug 2012 08:04:25 +0000 Subject: x11/xcb-util-image: Fix build for some compilers. gcc44 complains "control reaches end of non-void function" on DragonFly Apparently gcc45+ recognizes the assert, but for those compilers that don't, putting a dummy return value won't hurt anything and it fixes the build at least for gcc 4.4. --- x11/xcb-util-image/distinfo | 3 ++- .../patches/patch-image_xcb__image.c | 26 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 x11/xcb-util-image/patches/patch-image_xcb__image.c (limited to 'x11') diff --git a/x11/xcb-util-image/distinfo b/x11/xcb-util-image/distinfo index 041b23f524a..593c79c90fa 100644 --- a/x11/xcb-util-image/distinfo +++ b/x11/xcb-util-image/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.1 2012/08/12 21:19:06 wiz Exp $ +$NetBSD: distinfo,v 1.2 2012/08/18 08:04:25 marino Exp $ SHA1 (xcb-util-image-0.3.9.tar.bz2) = afeba6230400fe8bec6076fd07bf20a8e412bbb5 RMD160 (xcb-util-image-0.3.9.tar.bz2) = c666b87e20eaa703697df758e1d0e26aec2d62a4 Size (xcb-util-image-0.3.9.tar.bz2) = 310947 bytes +SHA1 (patch-image_xcb__image.c) = d0a956fc8786f03c8cce9d87f748cc02d3a8ac21 diff --git a/x11/xcb-util-image/patches/patch-image_xcb__image.c b/x11/xcb-util-image/patches/patch-image_xcb__image.c new file mode 100644 index 00000000000..5cbef864462 --- /dev/null +++ b/x11/xcb-util-image/patches/patch-image_xcb__image.c @@ -0,0 +1,26 @@ +$NetBSD: patch-image_xcb__image.c,v 1.1 2012/08/18 08:04:25 marino Exp $ + +gcc44 complains "control reaches end of non-void function" on DragonFly +Apparently gcc45+ recognizes the assert, but for those compilers that don't, +putting a dummy return value won't hurt anything. + +--- image/xcb_image.c.orig 2011-06-30 08:05:22.000000000 +0000 ++++ image/xcb_image.c +@@ -187,6 +187,8 @@ xcb_image_create_native (xcb_connection_ + assert(0); + } + assert(0); ++/* gcc44 complains "control reaches end of non-void function", fix below */ ++ return (-1); + } + + +@@ -750,6 +752,8 @@ xcb_image_get_pixel (xcb_image_t *image, + return pixel; + default: + assert(0); ++/* gcc44 complains "control reaches end of non-void function", fix below */ ++ return (-1); + } + } + -- cgit v1.2.3