Clean-up: fix '-Wnused-parameter' warnings on various platforms
[lttng-tools.git] / src / common / unix.cpp
index 091587f48f0edbd31ebdb4d24f6714abba19b131..4861b8ea139ae64b10bb4c0328bafc56d08587cc 100644 (file)
@@ -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.
@@ -1138,7 +1150,7 @@ int lttcomm_setsockopt_creds_unix_sock(int sock)
        return ret;
 }
 #elif (defined(__FreeBSD__) || defined(__sun__) || defined(__APPLE__))
-int lttcomm_setsockopt_creds_unix_sock(int sock)
+int lttcomm_setsockopt_creds_unix_sock(int sock __attribute__((unused)))
 {
        return 0;
 }
This page took 0.024278 seconds and 4 git commands to generate.