configure: add '-Wlogical-op' to warning flags
[lttng-tools.git] / src / common / unix.cpp
index 9c36c883e9afc6af62108828334312421ee36040..beeb69572f8e48902f5dd2cb235ddc05bb683d18 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 2011 EfficiOS Inc.
  * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * SPDX-License-Identifier: GPL-2.0-only
+ * SPDX-License-Identifier: LGPL-2.1-only
  *
  */
 
@@ -239,8 +239,11 @@ retry:
                        /*
                         * We consider EPIPE and EAGAIN/EWOULDBLOCK as expected.
                         */
+                       DIAGNOSTIC_PUSH
+                       DIAGNOSTIC_IGNORE_LOGICAL_OP
                        if (errno == EAGAIN || errno == EWOULDBLOCK ||
                                        errno == EPIPE) {
+                       DIAGNOSTIC_POP
                                /*
                                 * Nothing was recv.
                                 */
@@ -343,8 +346,11 @@ retry:
                        /*
                         * We consider EPIPE and EAGAIN/EWOULDBLOCK as expected.
                         */
+                       DIAGNOSTIC_PUSH
+                       DIAGNOSTIC_IGNORE_LOGICAL_OP
                        if (errno == EAGAIN || errno == EWOULDBLOCK ||
                                        errno == EPIPE) {
+                       DIAGNOSTIC_POP
                                /*
                                 * This can happen in non blocking mode.
                                 * Nothing was sent.
@@ -569,7 +575,10 @@ retry:
                        /*
                         * We consider EPIPE and EAGAIN/EWOULDBLOCK as expected.
                         */
+                       DIAGNOSTIC_PUSH
+                       DIAGNOSTIC_IGNORE_LOGICAL_OP
                        if (errno == EAGAIN || errno == EWOULDBLOCK) {
+                       DIAGNOSTIC_POP
                                /*
                                 * This can happen in non blocking mode.
                                 * Nothing was sent.
@@ -883,7 +892,10 @@ retry:
                        /*
                         * We consider EPIPE and EAGAIN/EWOULDBLOCK as expected.
                         */
+                       DIAGNOSTIC_PUSH
+                       DIAGNOSTIC_IGNORE_LOGICAL_OP
                        if (errno == EAGAIN || errno == EWOULDBLOCK) {
+                       DIAGNOSTIC_POP
                                /*
                                 * This can happen in non blocking mode.
                                 * Nothing was recv.
This page took 0.023308 seconds and 4 git commands to generate.