:: [Frei0r] possible bug in macro defi…
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Jaromil
Ημερομηνία:  
Προς: Frei0r free video plugins
Αντικείμενο: [Frei0r] possible bug in macro definition in frei0r_math.h

dear developers,

while interacting over the contribution of a new normalization filter,
the doubt of having found a bug emerged regarding the MIN/MAX macro
definitions in frei0r_math.h, see
https://github.com/dyne/frei0r/blob/master/include/frei0r_math.h#L67

as you can see there are trailing semicolons on those macros, which
shouldn't be there IMHO. the bug does not raise any problem in normal
usage of macros on standalone lines (but also in case the MIN/MAX
macros are already defined, according to enclosing #ifdefs). Yet the
corner-case of the bug arises in this new plugin when build on
travis-CI (ubuntu 14) since they are used inside a conditional, see:
https://travis-ci.org/dyne/frei0r#L1715

and that obviously breaks the C syntax rather than ignoring an
additional semicolon at end of line.

I am incline to consider this a bug in frei0r (thanks to @Chungzuwalla
on github for spotting it!) and would like to proceed fixing. Are
there strong opinion against this fix? at a quick glance on all frei0r
codebase I believe this doesn't affects any other filter, it all
compiles smoothly.

ciao


-- 
~.,_   Denis Roio aka Jaromil    http://Dyne.org think &do tank
    "+.   CTO and co-founder      free/open source developers
      @)   ⚷ crypto κρυπτο крипто गुप्त् 加密 האנוסים المشفره
    @@)  GnuPG: 6113D89C A825C5CE DD02C872 73B35DA5 4ACB7D10
(@@@)  opmsg:73a8e097a038d82b 8afb4c05804bda0d 281b3880fbc19b88