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 9A82643DAA; Mon, 1 Apr 2024 19:03:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59E1C402DD; Mon, 1 Apr 2024 19:03:12 +0200 (CEST) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id 98440402CF for ; Mon, 1 Apr 2024 19:03:10 +0200 (CEST) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-6e703e0e5deso3260879b3a.3 for ; Mon, 01 Apr 2024 10:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1711990990; x=1712595790; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cxteX4w5ekKNt3zOa0ShIw6MHKISUV86ugVaH4nx8P4=; b=01y+1b+aNm8JNFpL2vpFyuJhAGdurAwcuSlp9yuTY2QasEQhxSOe3wxIwNLM4PkVNw HgRiGY1+SMNgCtK44zLULbjYtLiqNeyZ/NkQGuA4bDkgH0qwvjtfCcbWPLbFu66Ytrih fuWKOwArxPPxzqVtsgggy29Ir6Jw9G3DvvbnQPCdYLuSeDZCcCXwv/IH4vp/j3Hy8y1Y fxpBxbTiNT62qNGwfTIKrym132qgmLNRnP2vcVg/YTh/c2+C5aShxlIHXe38L3evywc8 KWcQQv8WQWx1B0m9fZE2xxIDsxRSDDzm3qDKDT4e4AGPSPXHRuTGT1FA5yukWgsPc2cD SQNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711990990; x=1712595790; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cxteX4w5ekKNt3zOa0ShIw6MHKISUV86ugVaH4nx8P4=; b=sj/mKOsDXBk/j87PC6+HY7MfyHnYsbiBqpgIeK1b73lM1us5ACO4rRg/9ELGgVWRpB fmE+rypFDMpoALJs6jbQd8UKxb6p5MSUXrxj7RCaJqihkKdP5N5CCnxFIaHdd4D6WqHM m+9C0NNWykqHiI9+YXk7wHRPKjdfnPrevB3AP27zB50lJ9+3q7K1fruvUTaiCisPEPex KCeu69h/aJ3oxk03pbLXeW+9UVl/IGQeBdcieDC3mwHUOizofMAt4B/FbK3bJ6E64r4/ TugIqD+6CsPB+rG7KeCeWnKafNoSzsIzI3dhNxkOjcDux926w/mgR0TMoRKBsHClDDlY JBQg== X-Gm-Message-State: AOJu0YwIEJqdpWJX4NiE7FVUaCzd0+sq5nWbLc0V9RZBL4ceHnRQkXT+ /06iAm89xxSqULMpJ9sDL4cKnq+aJQmZfS5FTH+TLWQU1j1/ApXNFLzIJ4qvSC1DOyogN+rg8S0 a X-Google-Smtp-Source: AGHT+IEyNexX4D+6fTruMcJwh+Lurn6lg1IFM3dv7rxPnbf6zFNViEta3m5gfkw+2xCewAyrEeHkIQ== X-Received: by 2002:a05:6a00:39a9:b0:6ea:7468:1f31 with SMTP id fi41-20020a056a0039a900b006ea74681f31mr10026883pfb.30.1711990989643; Mon, 01 Apr 2024 10:03:09 -0700 (PDT) Received: from hermes.local (204-195-123-203.wavecable.com. [204.195.123.203]) by smtp.gmail.com with ESMTPSA id a18-20020aa780d2000000b006e6cc93381esm8101729pfn.125.2024.04.01.10.03.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 10:03:09 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH 2/2] mempool: fix unused warning with MSVC Date: Mon, 1 Apr 2024 10:01:53 -0700 Message-ID: <20240401170257.121047-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240401170257.121047-1-stephen@networkplumber.org> References: <20240401170257.121047-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Applying __rte_unused to a variable has no effect with MS windows compiler. The temporary variable used if debug enabled can just be eliminated. Signed-off-by: Stephen Hemminger --- lib/mempool/rte_mempool.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c index 734e8a2feb..2ac815a3bb 100644 --- a/lib/mempool/rte_mempool.c +++ b/lib/mempool/rte_mempool.c @@ -164,7 +164,6 @@ mempool_add_elem(struct rte_mempool *mp, __rte_unused void *opaque, void *obj, rte_iova_t iova) { struct rte_mempool_objhdr *hdr; - struct rte_mempool_objtlr *tlr __rte_unused; /* set mempool ptr in header */ hdr = RTE_PTR_SUB(obj, sizeof(*hdr)); @@ -175,8 +174,7 @@ mempool_add_elem(struct rte_mempool *mp, __rte_unused void *opaque, #ifdef RTE_LIBRTE_MEMPOOL_DEBUG hdr->cookie = RTE_MEMPOOL_HEADER_COOKIE2; - tlr = rte_mempool_get_trailer(obj); - tlr->cookie = RTE_MEMPOOL_TRAILER_COOKIE; + rte_mempool_get_trailer(obj)->cookie = RTE_MEMPOOL_TRAILER_COOKIE; #endif } -- 2.43.0