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 41F04A0A0C; Sun, 8 Aug 2021 14:52:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A30A41175; Sun, 8 Aug 2021 14:51:51 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id E416641170 for ; Sun, 8 Aug 2021 14:51:49 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 9B86D5C004A; Sun, 8 Aug 2021 08:51:49 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 08 Aug 2021 08:51:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm1; bh= w/mDflN0hFOkF3KD+46orSbnww8mwnH0sYjCrO9rMaY=; b=wB9mmbDKRtdUgW/D iYby7TTp17ul02b73FhXIw/wtnfT3mLXGzdSwYrXxJCo7uC/dSun8xl4AuzeszWP mhO7khIHHkh3Ug51TR0O1w5BLFcHgh4gcFWaWVXIWEJ/nD4FGQPo3VhHnmdiEUrk q0Juag3yZJSuuv0hFw8gFWJdAh5HpXwbog8viEgoRFkAyqRkgIUvYjoqgGZ5kkbU MATm0a/f+Smf1yOmdf+EVC4ZvrwE9BtoPWFiPFUlD4ZfOW7jbStCQqZeXxK1aD6w YBuu1V3cUr3jMcLS66h+vVLFbaAs/rVzQ53NYd9yQVHkiQjMs7slYLhPntAxWIyC VEv5tw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=w/mDflN0hFOkF3KD+46orSbnww8mwnH0sYjCrO9rM aY=; b=WOgRDPN2SCFntEx+7uk05TRma+2s/MHipi38wMVJw4HHjKfzE0Xl0riiO uu52Rwz9GfsfWO4Cu293zmnmAXZEXdy1Fo3f+k9xkAOruLGaj0gy006rPS+uvJoi FpSboBRJJgXQxFaL6fQEQIQ9koqtyn76BFCO6h4Xo/6Ns9LnTEVWhhG+3aEtNiBh 43sdXh3rV3d1qUPOgO/B4X6r091DIDTOlsYdRRFgzUSNXTvjPWGaC1bpRYzxoYG2 f2cOE/FkYjFUxu80uonJQHYpH43NtGT92AYivaTDLh178c18A+/RclRc+2Qytk2z Nec4EcephFxaThZlTBugdvFbducyQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeehgdehjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvedutdevueevjeekveehheevffeugeejudekffeltdelkeeifeeg udehvdegjefhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 8 Aug 2021 08:51:48 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: bruce.richardson@intel.com, david.marchand@redhat.com, Matan Azrad , Viacheslav Ovsiienko Date: Sun, 8 Aug 2021 14:51:36 +0200 Message-Id: <20210808125139.3573701-4-thomas@monjalon.net> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210808125139.3573701-1-thomas@monjalon.net> References: <20210412215339.2439530-1-thomas@monjalon.net> <20210808125139.3573701-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 3/5] vdpa/mlx5: fix minsize build 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 Sender: "dev" Error occurs when configuring meson with --buildtype=minsize with GCC 11.1.0: drivers/vdpa/mlx5/mlx5_vdpa_mem.c: In function ‘mlx5_vdpa_mem_register’: drivers/vdpa/mlx5/mlx5_vdpa_mem.c:183:24: error: initialization of ‘uint64_t’ {aka ‘long unsigned int’} from ‘void *’ makes integer from pointer without a cast [-Werror=int-conversion] | uint64_t gcd = NULL; | ^~~~ drivers/vdpa/mlx5/mlx5_vdpa_mem.c:244:75: error: ‘mode’ may be used uninitialized in this function [-Werror=maybe-uninitialized] | klm_size = mode == MLX5_MKC_ACCESS_MODE_KLM ? | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | KLM_SIZE_MAX_ALIGN(empty_region_sz) : gcd; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ Signed-off-by: Thomas Monjalon --- drivers/vdpa/mlx5/mlx5_vdpa_mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_mem.c b/drivers/vdpa/mlx5/mlx5_vdpa_mem.c index a13bde5a0b..59ce4e891c 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa_mem.c +++ b/drivers/vdpa/mlx5/mlx5_vdpa_mem.c @@ -177,10 +177,10 @@ mlx5_vdpa_mem_register(struct mlx5_vdpa_priv *priv) struct mlx5_devx_mkey_attr mkey_attr; struct mlx5_vdpa_query_mr *entry = NULL; struct rte_vhost_mem_region *reg = NULL; - uint8_t mode; + uint8_t mode = 0; uint32_t entries_num = 0; uint32_t i; - uint64_t gcd; + uint64_t gcd = 0; uint64_t klm_size; uint64_t mem_size; uint64_t k; -- 2.31.1