diff mbox

[oe,meta-oe,32/49] md5deep: Fix build with clang

Message ID 20161123092209.23699-32-raj.khem@gmail.com
State Accepted
Commit 856ac210ab223da1adb6e8a30298a10f1d05d61a
Headers show

Commit Message

Khem Raj Nov. 23, 2016, 9:21 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../files/0001-Fix-errors-found-by-clang.patch     | 32 ++++++++++++++++++++++
 meta-oe/recipes-extended/md5deep/md5deep_4.4.bb    |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta-oe/recipes-extended/md5deep/files/0001-Fix-errors-found-by-clang.patch

-- 
2.10.2

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox

Patch

diff --git a/meta-oe/recipes-extended/md5deep/files/0001-Fix-errors-found-by-clang.patch b/meta-oe/recipes-extended/md5deep/files/0001-Fix-errors-found-by-clang.patch
new file mode 100644
index 0000000..cc7cdc3
--- /dev/null
+++ b/meta-oe/recipes-extended/md5deep/files/0001-Fix-errors-found-by-clang.patch
@@ -0,0 +1,32 @@ 
+From 6ef69a26126ee4e69a25392fd456b8a66c51dffd Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 15 Nov 2016 02:46:55 +0000
+Subject: [PATCH] Fix errors found by clang
+
+Fixes errors like
+
+../../git/src/hash.cpp:282:19: error: ordered comparison between pointer and zero ('const unsigned char *' and 'int')
+            if(fdht->base>0){
+               ~~~~~~~~~~^~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/hash.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/hash.cpp b/src/hash.cpp
+index 4216157..52f419b 100644
+--- a/src/hash.cpp
++++ b/src/hash.cpp
+@@ -279,7 +279,7 @@ void file_data_hasher_t::hash()
+ 		MAP_FILE|
+ #endif
+ 		MAP_SHARED,fd,0);
+-	    if(fdht->base>0){		
++	    if(fdht->base != (void *) -1){
+ 		/* mmap is successful, so set the bounds.
+ 		 * if it is not successful, we default to reading the fd
+ 		 */
+-- 
+1.9.1
+
diff --git a/meta-oe/recipes-extended/md5deep/md5deep_4.4.bb b/meta-oe/recipes-extended/md5deep/md5deep_4.4.bb
index 960e00f..bb30abe 100644
--- a/meta-oe/recipes-extended/md5deep/md5deep_4.4.bb
+++ b/meta-oe/recipes-extended/md5deep/md5deep_4.4.bb
@@ -9,6 +9,7 @@  SRCREV = "cd2ed7416685a5e83eb10bb659d6e9bec01244ae"
 
 SRC_URI = "git://github.com/jessek/hashdeep.git \
         file://wrong-variable-expansion.patch \
+        file://0001-Fix-errors-found-by-clang.patch \
         "
 
 S = "${WORKDIR}/git"