Menu

#324 MSVC logic warning in 1.29.1

1.28.x
closed-fixed
nobody
None
5
2021-10-23
2021-10-18
manx
No

1.29.1 introduces a warning compared to 1.29.0

+   if(!mh->state_flags & FRAME_DECODER_LIVE)
+       return MPG123_ERR;

results in the following warning:

C:\Users\manx\projects\openmpt\buildbot\g2_trunk_lib_win10_vs2019_analyze_arm\build\include\mpg123\src\libmpg123\libmpg123.c(894): warning C6290: Bitwise operation on logical result:  ! has higher precedence than &.  Use && or (!(x & y)) instead. [C:\Users\manx\projects\openmpt\buildbot\g2_trunk_lib_win10_vs2019_analyze_arm\build\build\vs2019win10\ext\mpg123.vcxproj]

I would assume if(!(mh->state_flags & FRAME_DECODER_LIVE)) instead of if(!mh->state_flags & FRAME_DECODER_LIVE) was intended?

Also, I could not select version 1.29.x in the bug tracker.

Discussion

  • Thomas Orgis

    Thomas Orgis - 2021-10-18

    Oh, this is too stupid. Luckily enough, this just means that the check is a no-op in practice, and this is in a function for the framebyframe API, not the main one.

    I'll prep 1.29.2, then … anything else you notice?

     
    • manx

      manx - 2021-10-18

      Thanks, no, nothing else came up.

       
  • Thomas Orgis

    Thomas Orgis - 2021-10-23

    1.29.2 is arriving with the fix.

     
  • Thomas Orgis

    Thomas Orgis - 2021-10-23
    • status: open --> closed-fixed
     

Log in to post a comment.