Menu

#407 [PATCH] dcraw.cc: wrong variable type for find_green() return value

closed-fixed
nobody
None
5
2016-08-07
2016-07-31
pawelbsd
No

Patch fixing build issue on FreeBSD 12.0-CURRENT:

dcraw.cc:9245:20: error: call to 'abs' is ambiguous
if (abs(i) < abs(c)) {

compiler:
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
Target: x86_64-unknown-freebsd12.0
Thread model: posix

find_green() returns float result, while i and c variables are unsigned type. Also abs() function
takes int argument. Attached patch uses proper type for for variables and fabsf() to
compare them.

1 Attachments

Discussion

  • Niels Kristian Bech Jensen

    • status: open --> closed-fixed
     
  • Niels Kristian Bech Jensen

    Thank you for the patch. I have commited it to the cvs repository.

    Regards,
    Niels Kristian

     

Log in to post a comment.