#208 Compilation fails in gcc4.9.0 when compiled with -Werror=unused-value

0.68
closed-fixed
nobody
None
5
2015-01-08
2014-04-22
Daniel Pinyol
No

Compilation fails in gcc4.9.0 when compiled with -Werror=unused-value

/libMPG123/id3.c:509:3: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
,1 \ ^
/home/dani/svn/robot/sources/src/interaction/sound/codecs/mpg123/libMPG123/id3.c:584:35: note: in expansion of macro ‘threebytes_to_long’
if(fr->id3v2.version == 2) threebytes_to_long(tagdata+pos, framesize);
^

Discussion

  • Thomas Orgis
    Thomas Orgis
    2014-04-23

    Hm, I need a calm moment to fathom why the ,1 is there. For some reason, I apparently put it there over 6 years ago. I suspect something with using the macro in a condition chain and ensuring a true value. Anyway, unless you enforce overly strict compilation, it doesn't hurt.

     
  • Thomas Orgis
    Thomas Orgis
    2014-05-10

    OK, this was inherited from the other macros that actually indicate something with the return value. Not needed for this one. Fixed in next release.

     
  • Daniel Pinyol
    Daniel Pinyol
    2014-05-12

    thanks!

     
  • Thomas Orgis
    Thomas Orgis
    2015-01-08

    • status: open --> closed-fixed