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 804D743DAA; Mon, 1 Apr 2024 19:03:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A73E402D2; Mon, 1 Apr 2024 19:03:11 +0200 (CEST) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id D0EA34028B for ; Mon, 1 Apr 2024 19:03:09 +0200 (CEST) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-6ea9a616cc4so2872513b3a.1 for ; Mon, 01 Apr 2024 10:03:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1711990989; x=1712595789; 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=S5dUAq3LAjAuy8LOJ/UIb1Pod3vsFVofJPHmB2uTlKA=; b=pbyBhDnyDtYGeUKgSWzuJbNRyWzSU6rgtQJANQWDsqLX7POpMgEKq0aks8C0X0KfFW +tULNmx8hUe0oCCy+UUqN57M9sWKNLThOZLc9NB7rrq+y9osWBXTgVqBiie/xya3Gw7Y 3vpnk0azqdoCrVOeu8alR064qbJHHawd6yXMFJHxfl9cM098a3SqsXy+8Qe85KrYhkZe I9b7zBRmf2+mWup7dwdlkN8PqnvZT/eFdSsEBRqelmOzBuWvjbKJM48ehT3iHSKxwmkv N6aoCHTp6poeP5VDe1azmvuf8wMWAKg369Irly+3N+w/A/grTA39rNrGZ8m43M2p6Cek 1W7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711990989; x=1712595789; 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=S5dUAq3LAjAuy8LOJ/UIb1Pod3vsFVofJPHmB2uTlKA=; b=K8ZWahTjcytJImNl2sbabL/maDJDH7u7Gy8u4cSkIvb3CtPQgevWc+losOcAAZ+Bhg x5aKTZM6NJMtsvdrFKo1DSNfalqA4ielV0/DK0aWEI4bV0zYM7SNZKaJMMW3vTtp5ocM Z0NOWvK9n/99Zn56LtHH2xMrkhc7ylRg1O7EGlDq1jduZDsZlwX9FT2E6DZO5R9NgFrR 2jDemL/Ufnc2AyfuscO80qJBxGZqfX4zxgAeIqFBTBDGOnzTkwaA0Pf8YeO38e/rOiIW oaTH4bOCLRZLMD+kXubMAQU7IbVTDbZkK3U7ZsFB1w8Hb/hBdwHEOKKK7CugVNMaYlB1 iFsw== X-Gm-Message-State: AOJu0YwLwBsJVDSALAZN5GWT8KUNqs7N/4kAeJU/J2ERmlcWXkXVFV5I Zebn+ZmrhUofWh3g/JOWSkVzeFanTBZ4KIVx4o/Jr/tnSqWhYyqC70Y/loZF7XPFyl3P/Y1oglF t X-Google-Smtp-Source: AGHT+IFb6ekNM/mVfCbYTq5+EBdgUErQgnjkgKGMpOjgONCdPbm+puBY475RIhZlXqdd27hoXMegVw== X-Received: by 2002:a05:6a20:2d12:b0:1a3:6465:208e with SMTP id g18-20020a056a202d1200b001a36465208emr11910349pzl.55.1711990988943; Mon, 01 Apr 2024 10:03:08 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 10:03:08 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH 1/2] mempool: replace GCC pragma with cast Date: Mon, 1 Apr 2024 10:01:52 -0700 Message-ID: <20240401170257.121047-2-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 Building mempool with MSVC generates a warning because of this pragma (same with clang when debug is enabled). The issue the pragma was working around can be better solved by using an additional cast. Fixes: af75078fece3 ("first public release") Signed-off-by: Stephen Hemminger --- lib/mempool/rte_mempool.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c index 12390a2c81..734e8a2feb 100644 --- a/lib/mempool/rte_mempool.c +++ b/lib/mempool/rte_mempool.c @@ -1056,10 +1056,6 @@ rte_mempool_dump_cache(FILE *f, const struct rte_mempool *mp) return count; } -#ifndef __INTEL_COMPILER -#pragma GCC diagnostic ignored "-Wcast-qual" -#endif - /* check and update cookies or panic (internal) */ void rte_mempool_check_cookies(const struct rte_mempool *mp, void * const *obj_table_const, unsigned n, int free) @@ -1074,7 +1070,7 @@ void rte_mempool_check_cookies(const struct rte_mempool *mp, /* Force to drop the "const" attribute. This is done only when * DEBUG is enabled */ - tmp = (void *) obj_table_const; + tmp = (void *)(uintptr_t)obj_table_const; obj_table = tmp; while (n--) { @@ -1183,10 +1179,6 @@ mempool_audit_cookies(struct rte_mempool *mp) #define mempool_audit_cookies(mp) do {} while(0) #endif -#ifndef __INTEL_COMPILER -#pragma GCC diagnostic error "-Wcast-qual" -#endif - /* check cookies before and after objects */ static void mempool_audit_cache(const struct rte_mempool *mp) -- 2.43.0