From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B3A4045E6F; Wed, 11 Dec 2024 03:07:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 24F9840A6C; Wed, 11 Dec 2024 03:06:38 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 786994064C for ; Wed, 11 Dec 2024 03:06:17 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 2C82B2047230; Tue, 10 Dec 2024 18:06:17 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2C82B2047230 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733882777; bh=sGGlUeZlw5kv2ZFgH8Xs3i6c0U+7BickJhGEQT65XgY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IkjIVxg9OPwFnZU8ZkQOTpxHNb4PFKPgt3rOMsMhZ6K3VkgA07DQ3tTEfLaY2qsOJ yO7ArkqpjnUrTmWtdNmdaE1ujtsG9JugU8oEspP74HcdyNDnRWII3fbN+WPScPNwCK T0sEPj3cFyPEr7FDUWI+TeC3glEh2m3gGJO09uhA= From: Andre Muezerie To: Stephen Hemminger Cc: dev@dpdk.org, Andre Muezerie Subject: [PATCH 16/21] lib/log: ensure code structure does not change Date: Tue, 10 Dec 2024 18:05:46 -0800 Message-Id: <1733882751-29598-17-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1733882751-29598-1-git-send-email-andremue@linux.microsoft.com> References: <1733882751-29598-1-git-send-email-andremue@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add "do { } while (0)" to macros used to remove logging calls, to ensure there's no code structure change when enabling/disabling logging. Signed-off-by: Andre Muezerie --- lib/log/rte_log.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/log/rte_log.h b/lib/log/rte_log.h index 3735137150..6b00caab88 100644 --- a/lib/log/rte_log.h +++ b/lib/log/rte_log.h @@ -364,7 +364,7 @@ int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap) static_assert(!__builtin_strchr(fmt, '\n'), \ "This log format string contains a \\n") #else -#define RTE_LOG_CHECK_NO_NEWLINE(...) +#define RTE_LOG_CHECK_NO_NEWLINE(...) do { } while (0) #endif /** -- 2.47.0.vfs.0.3