[flann] 01/01: Added Andreas Metzler changes from 1.8.4-4.2

Leopold Palomo-Avellaneda leo at alaxarxa.net
Sat Jul 30 23:05:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

lepalom-guest pushed a commit to branch 1.8.4
in repository flann.

commit 849484a85ae469b3131a9fedbbb30c790c6a92ad
Author: Leopold Palomo-Avellaneda <leo at alaxarxa.net>
Date:   Sun Jul 31 00:39:31 2016 +0200

    Added Andreas Metzler changes from 1.8.4-4.2
---
 debian/changelog                    |  9 +++++++++
 debian/patches/20_abs-std-abs.patch | 35 +++++++++++++++++++++++++++++++++++
 debian/patches/series               |  1 +
 3 files changed, 45 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index cb8e52e..b6208e5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+flann (1.8.4-4.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * 20_abs-std-abs.patch: 3645f0c30a47267e56e5acdecfc7bac2b76bc3d5 from
+    upstream GIT. Use std::abs instead of abs, fixing gcc6 build error.
+    Closes: #822717
+
+ -- Andreas Metzler <ametzler at debian.org>  Sat, 30 Jul 2016 15:07:35 +0200
+
 flann (1.8.4-4.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff --git a/debian/patches/20_abs-std-abs.patch b/debian/patches/20_abs-std-abs.patch
new file mode 100644
index 0000000..1d31865
--- /dev/null
+++ b/debian/patches/20_abs-std-abs.patch
@@ -0,0 +1,35 @@
+From 3645f0c30a47267e56e5acdecfc7bac2b76bc3d5 Mon Sep 17 00:00:00 2001
+From: Alastair Quadros <alastair.j.quadros at gmail.com>
+Date: Sun, 15 Mar 2015 10:58:57 +1100
+Subject: [PATCH] abs -> std::abs
+
+warning: using integer absolute value function 'abs' when argument is of
+floating point type [-Wabsolute-value]
+---
+ src/cpp/flann/algorithms/kdtree_index.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/cpp/flann/algorithms/kdtree_index.h b/src/cpp/flann/algorithms/kdtree_index.h
+index 42659ca..fc12d8f 100644
+--- a/src/cpp/flann/algorithms/kdtree_index.h
++++ b/src/cpp/flann/algorithms/kdtree_index.h
+@@ -36,6 +36,7 @@
+ #include <cassert>
+ #include <cstring>
+ #include <stdarg.h>
++#include <cmath>
+ 
+ #include "flann/general.h"
+ #include "flann/algorithms/nn_index.h"
+@@ -663,7 +664,7 @@ private:
+             ElementType max_span = 0;
+             size_t div_feat = 0;
+             for (size_t i=0;i<veclen_;++i) {
+-                ElementType span = abs(point[i]-leaf_point[i]);
++                ElementType span = std::abs(point[i]-leaf_point[i]);
+                 if (span > max_span) {
+                     max_span = span;
+                     div_feat = i;
+-- 
+2.8.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 57908a3..697bb0a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 remove_tests.patch
 fixmultiarchlibinstall.patch
 fix-cmake-hdf5.patch
+20_abs-std-abs.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/flann.git



More information about the debian-science-commits mailing list