X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Funix.cpp;h=0a1b1a5a54354beb1b759a7a95d6b6953d340ed2;hb=c9e313bc594f40a86eed237dce222c0fc99c957f;hp=9c36c883e9afc6af62108828334312421ee36040;hpb=21cf9b6b1843774306a76f4dccddddd706b64f79;p=lttng-tools.git diff --git a/src/common/unix.cpp b/src/common/unix.cpp index 9c36c883e..0a1b1a5a5 100644 --- a/src/common/unix.cpp +++ b/src/common/unix.cpp @@ -2,7 +2,7 @@ * Copyright (C) 2011 EfficiOS Inc. * Copyright (C) 2011 Mathieu Desnoyers * - * SPDX-License-Identifier: GPL-2.0-only + * SPDX-License-Identifier: LGPL-2.1-only * */ @@ -15,12 +15,12 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include -#include "unix.h" +#include "unix.hpp" /* * Connect to unix socket using the path name. @@ -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; }