runloop.c: 2 * bad if tests

David Binderman dcb314 at hotmail.com
Mon Aug 27 11:47:04 PDT 2012


I just tried a compile of cups-1.6.1 with
extra compiler flag -Wlogical-op.

The compiler said

runloop.c: In function 'backendDrainOutput':
runloop.c:93:7: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op]
       if (errno != EAGAIN || errno != EINTR)
       ^
runloop.c: In function 'backendRunLoop':
runloop.c:321:2: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op]
  if (errno != EAGAIN || errno != EINTR)
  ^

Suggest swap || for &&





More information about the cups mailing list