Menu

#246 compile issue in pix_colorclassify.cpp

0.94
closed-fixed
None
linux
5
2016-05-25
2016-05-23
No

I'm getting these errors when compiling Gem on Arch with gcc 6.1.1:

pix_colorclassify.cpp:156:1: error: narrowing conversion of ‘1.275e+2’ from ‘double’ to ‘unsigned char’ inside { } [-Wnarrowing]
 };
 ^
pix_colorclassify.cpp:170:1: error: narrowing conversion of ‘1.275e+2’ from ‘double’ to ‘unsigned char’ inside { } [-Wnarrowing]
 };
 ^
pix_colorclassify.cpp:184:1: error: narrowing conversion of ‘1.275e+2’ from ‘double’ to ‘unsigned char’ inside { } [-Wnarrowing]
 };
 ^
Makefile:1102: recipe for target 'libPixes_la-pix_colorclassify.lo' failed

Looks like the latest gcc is a little picky here. :) But maybe 0.5*255 could just be replaced with 127? Suggested patch attached.

1 Attachments

Discussion

  • IOhannes m zmölnig

    • status: open --> closed-fixed
    • assigned_to: IOhannes m zmölnig
    • Release: unknown --> 0.94
     
  • IOhannes m zmölnig

    thanks.

    i've cleaned up the code, and as a side-effect the issue should be gone

     

    Related

    Commit: [88b29e]

Anonymous
Anonymous

Add attachments
Cancel