Passed: OpenSmalltalk/opensmalltalk-vm#1531 (Cog - 14b6d36)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Passed: OpenSmalltalk/opensmalltalk-vm#1531 (Cog - 14b6d36)

Travis CI
 

OpenSmalltalk

/

opensmalltalk-vm

branch iconCog

arrow to build time
clock icon55 mins and 11 secs

Nicolas Cellier avatarNicolas Cellier

Fix suspiscious logical construction

In code we find this flag:

#define SOCK_BOUND_UDP 0x00040000

and test of this flag in socket state:

if(pss->sockState & SOCK_BOUND_UDP)

We also find the negation:

if(!pss->sockState & SOCK_BOUND_UDP)

But there is a precedenc eproblem in above expression, as reported by the compiler

../../platforms/win32/plugins/SocketPlugin/sqWin32NewNet.c:872:8: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]
if(!pss->sockState & SOCK_BOUND_UDP) {
^ ~
../../platforms/win32/plugins/SocketPlugin/sqWin32NewNet.c:872:8: note: add parentheses after the '!' to evaluate the bitwise operator first
if(!pss->sockState & SOCK_BOUND_UDP) {
^
( )
../../platforms/win32/plugins/SocketPlugin/sqWin32NewNet.c:872:8: note: add parentheses around left hand side expression to silence this warning
if(!pss->sockState & SOCK_BOUND_UDP) {
^
( )

Above code is interpreted as `if( (!pss->sockState) & SOCK_BOUND_UDP)` which does not mean much...

Please, read C compiler warnings, they are a companion tool !

Want to know about upcoming build environment updates?

Would you like to stay up-to-date with the upcoming Travis CI build environment updates? We set up a mailing list for you!

SIGN UP HERE
book icon

Documentation about Travis CI

<script type="application/ld+json"> { "@context": "http://schema.org", "@type": "EmailMessage", "action": { "@type": "ViewAction", "url": "https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/builds/465986460?utm_medium=notification&amp;utm_source=email", "name": "View Build" }, "description": "View Build #1531 on Travis CI" } </script>