Control: tags 853692 + patch Control: tags 853692 + pending Dear maintainer,
I've prepared an NMU for ufraw (versioned as 0.22-1.2) and uploaded it to DELAYED/2. Please feel free to tell me if I should delay it longer. Regards.
diff -Nru ufraw-0.22/debian/changelog ufraw-0.22/debian/changelog --- ufraw-0.22/debian/changelog 2017-02-27 14:31:26.000000000 +0100 +++ ufraw-0.22/debian/changelog 2017-10-20 23:56:09.000000000 +0200 @@ -1,3 +1,11 @@ +ufraw (0.22-1.2) unstable; urgency=medium + + * Non-maintainer upload. + * Add patch to avoid using abs() on unsigned values which will fail on gcc 7 + due to ambiguous overload resolution. (Closes: #853692) + + -- Andreas Bombe <a...@debian.org> Fri, 20 Oct 2017 23:56:09 +0200 + ufraw (0.22-1.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru ufraw-0.22/debian/patches/04_no-unsigned-abs.patch ufraw-0.22/debian/patches/04_no-unsigned-abs.patch --- ufraw-0.22/debian/patches/04_no-unsigned-abs.patch 1970-01-01 01:00:00.000000000 +0100 +++ ufraw-0.22/debian/patches/04_no-unsigned-abs.patch 2017-10-20 23:53:40.000000000 +0200 @@ -0,0 +1,24 @@ +Description: Don't use abs() on unsigned values + With gcc 7, compilation will fail since the overload resolution for unsigned + int is ambiguous. Cast the unsigned int to int rather than removing abs(), + since the next if condition a few lines below points to unsigned values being + used as containers for signed values. + . + This is a minimal patch that doesn't change or improve the questionable code + on a larger scale. A proper fix should figure what is going on here and how to + improve it. +Author: Andreas Bombe <a...@debian.org> +Last-Update: 2017-10-20 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/dcraw.cc ++++ b/dcraw.cc +@@ -9245,7 +9245,7 @@ + if (make[0] == 'O') { + i = find_green (12, 32, 1188864, 3576832); + c = find_green (12, 32, 2383920, 2387016); +- if (abs(i) < abs(c)) { ++ if (abs((int)i) < abs((int)c)) { + SWAP(i,c); + load_flags = 24; + } diff -Nru ufraw-0.22/debian/patches/series ufraw-0.22/debian/patches/series --- ufraw-0.22/debian/patches/series 2017-02-27 14:30:30.000000000 +0100 +++ ufraw-0.22/debian/patches/series 2017-10-20 23:28:22.000000000 +0200 @@ -1,3 +1,4 @@ 01_no-gimp-remote.patch 02_CVE-2015-8366.patch 03_fix-unsigned-char.patch +04_no-unsigned-abs.patch