Hi all, There may be a bug in nr-filter-gaussian.cpp. The following warning is emitted:
src/display/nr-filter-gaussian.cpp: In function 'void Inkscape::Filters::filter2D_IIR(PT*, int, int, const PT*, int, int, int, int, const IIRValue*, const double*, IIRValue* const*, int) [with PT = unsigned char, unsigned int PC = 1u, bool PREMULTIPLIED_ALPHA = false, IIRValue = double]':
src/display/nr-filter-gaussian.cpp:504:45: instantiated from here
src/display/nr-filter-gaussian.cpp:342:13: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
src/display/nr-filter-gaussian.cpp:343:13: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
src/display/nr-filter-gaussian.cpp:504:45: instantiated from here
src/display/nr-filter-gaussian.cpp:358:17: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
The warning is emitted because the (incredibly ugly!) #define PREMUL_ALPHA_LOOP for(unsigned int c=0; c<PC-1; ++c) will resolve to #define PREMUL_ALPHA_LOOP for(unsigned int c=0; c<0; ++c) for the template instantiated value for PC = 1. Meaning that the loop will never run. Is this intended? If so, please fix the code to not emit that warning. If it's a bug, please fix the bug! :)
Thanks, Johan