]> code.ossystems Code Review - openembedded-core.git/commitdiff
xcb-util-image: Fix build with clang
authorKhem Raj <raj.khem@gmail.com>
Tue, 15 Mar 2016 07:10:12 +0000 (07:10 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 20 Mar 2016 22:57:55 +0000 (22:57 +0000)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-graphics/xorg-lib/xcb-util-image/clang.patch [new file with mode: 0644]
meta/recipes-graphics/xorg-lib/xcb-util-image_0.4.0.bb

diff --git a/meta/recipes-graphics/xorg-lib/xcb-util-image/clang.patch b/meta/recipes-graphics/xorg-lib/xcb-util-image/clang.patch
new file mode 100644 (file)
index 0000000..11e9094
--- /dev/null
@@ -0,0 +1,24 @@
+Make clang happy since it squashes the control warning, ideally it will never reach that return value due to assert
+but there is a chance when NDEBUG is defined
+
+| In file included from ../../xcb-util-image-0.4.0/image/xcb_image.c:37:
+| ../../xcb-util-image-0.4.0/image/xcb_bitops.h:210:1: error: control may reach end of non-void function [-Werror,-Wreturn-type]
+| }
+| ^
+| 1 error generated.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: xcb-util-image-0.4.0/image/xcb_bitops.h
+===================================================================
+--- xcb-util-image-0.4.0.orig/image/xcb_bitops.h
++++ xcb-util-image-0.4.0/image/xcb_bitops.h
+@@ -207,6 +207,7 @@ xcb_host_byte_order(void) {
+       return XCB_IMAGE_ORDER_LSB_FIRST;
+   }
+   assert(0);
++  return -1;
+ }
+ #endif /* __XCB_BITOPS_H__ */
index 91464b6c9820c92511f1e94ccbc002b8f227e1da..c6bb5a61cd8dde924ddda65251d7ba7d6a15f632 100644 (file)
@@ -6,5 +6,8 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://image/xcb_image.c;endline=24;md5=eafdf965cfb89955fdedf75054223fb4 \
                     file://image/xcb_image.h;beginline=4;endline=27;md5=48cd25ae55e7de525fe1e1a3a7672e1c"
 
+SRC_URI += "file://clang.patch \
+"
+
 SRC_URI[md5sum] = "08fe8ffecc8d4e37c0ade7906b3f4c87"
-SRC_URI[sha256sum] = "2db96a37d78831d643538dd1b595d7d712e04bdccf8896a5e18ce0f398ea2ffc"
\ No newline at end of file
+SRC_URI[sha256sum] = "2db96a37d78831d643538dd1b595d7d712e04bdccf8896a5e18ce0f398ea2ffc"