From nobody Sun Feb 8 18:49:26 2026 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38D3B34104E for ; Thu, 4 Dec 2025 16:17:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764865066; cv=none; b=Ghyu5eG21mDaZxrGamhnbzhKsKim/8Mew9WcZAZjBw9ER5U7uez3gl6E0gM5V+eMXK3HL1JtUgsQOTcwxv5HcpoaldVliVjIhClojOh+9P1FfPPVOgRjhps1sXOJijED2JQBeoIcsfxjwbE0RATd9Wyhhvl+d8Ymt3VN+jqdpX4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764865066; c=relaxed/simple; bh=3ygh4I0glRNwV35GaBKvlTRslUW//cHz3CUI6TSCtZM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tdE/Gpyz3D3mYcg9rlIVHtEhdp3v2e9ROoFmf2yd1CMYnwHIbBR8ZW3ZA9g0W7GNo4J7+OOUr6dlTFLzCuGjzUMzaJzQqznx0JBij4DTPvO7Ev6UOSmvErxqTXqVNJu8XwmmAwvCDhvlmdJtE8WSRTfP2MpeLRszud4lEaH42Bw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YDeuL0LN; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YDeuL0LN" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-295548467c7so13015405ad.2 for ; Thu, 04 Dec 2025 08:17:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764865064; x=1765469864; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=dkZnCgx9bxJPZq7l/gRW6dYxX2rEKzxVPCSQ60u6+7c=; b=YDeuL0LNnKv6Skf8JFXDETnbrmN4u8CazX+kdfLXew/nNZ7V6ZNP/PIB7UjlMR0EPL Uido8y8q61vndAul9btZRNmAk7zZtIiiWZ5KMkzZuFnRq49e2ftmfzPEBFFqHOcFt3CD DVmRgZCngvCNXzcxB4cSWYQiFf71iBV0WJKQbZ4VxFVbJyWIbFLWELN1mG3lcRVwJld4 JPbPsApQDRM/EjWohExjcFaZLJvUJBdOoqrm1ehm94FbdJiiyoz/JuiWMJSFrdlOOKvB 6wkij27fCrWtbq+gAGi9pJwjtjsKE9ZDF8ecm+EckA2kzeAhZws1hC1d0voeZ+4/+jS8 A9TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764865064; x=1765469864; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dkZnCgx9bxJPZq7l/gRW6dYxX2rEKzxVPCSQ60u6+7c=; b=CsCI103PwPK+XcDnw2fYwynnugDpuPkRvHRQszCTV5cQ6PCgDPYsVWmZZAjJwM0jv8 lZICq+9Bbcy4ODPuTNrbRKQs7x9/BkoPT05HF0a3TR7/m5LuaA/FWXEs5d5lRcVGYUzN DdJ8wLPZ2vMis/ddXNPFwh0XTjejR7aWOhszxGrA43E2cghjII6gPYnQ1ndYDPhVEivL ELM2gfIfjhJwj2MAZ0nb8rO7TzgaWccCYxjPWztPZN87t7U4KxdhWpoNAYNtBN5I8ES2 336zp+NYwlnJxhiP1f08pE7IYAekpUYo+KSQWmLtzdswOJCdc6lqXxRfUqVKpxT3PFlK +UUQ== X-Forwarded-Encrypted: i=1; AJvYcCVHNcSSNH7EFNZjUQ32JO5R1SWHWJKthHyX1VAwg+E/iZqjI9sKg9q+6bWGqYoXGltk1CaG8YZdMnzIc90=@vger.kernel.org X-Gm-Message-State: AOJu0YziJLPr0QJoiGImvVmOBuGLYtfMkbBhSUjPu2v2RysE3CXMRkDC jNwPCfwvfAkr6+BA1NKWUNEMxplOItwIO8CimsxTCW8hPiBUHhfOQEmZEn6ELg== X-Gm-Gg: ASbGncuKhYEEx4eKKE5LJI0Lg3eIdunTi9zDrKfm1HftnMbOFvtfURMJx2PjemThp03 gMZzF/KHXgmA71yr9XMMs9zNKBeREI49OoQ7sErwRPf81sIvwwWQ8pYJ74yEhg0gOe1BTAYELZ9 EgDdESDYn0pkyOQ9Pfj2bOxP0nONCHZz/ueuwHhUOzPXpLWcf9ddg2JEXwRerUsgr3j9iL0BaiX 49smFuqw8g3KfH9ZHvXTqI9bdw3b4ImnvMogrtqdlCOLyWtDw4ZdJVBbclDBqBnrnliVz8GGRTB Bdp7W+764L/UNifi630QRJLf4LzF3eJkEOholUsjqlZEU3fyx6uHN2METHr7U6HBUM0EM1z1YgP XEiMue13MAkzVUhv+cbjN2RlW8rJy5DbYqmefckXf6jNMEx5kcQY6eZahLJckTcx4JBNqW8/I4y PtejgAKWAj/Sf56S2C5Uy7DSw= X-Google-Smtp-Source: AGHT+IGvOyPD8rdOIos5LYcmChpa04+Wfxdyx/PwskRd3KR37HKV0AFf3UHo1YnF29GTR+qBDwW4gA== X-Received: by 2002:a05:7022:996:b0:11b:89f3:aaf8 with SMTP id a92af1059eb24-11df0bd181emr6324640c88.4.1764865064446; Thu, 04 Dec 2025 08:17:44 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:da43:aeff:fecc:bfd5]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-11df76e2eefsm8931800c88.6.2025.12.04.08.17.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Dec 2025 08:17:43 -0800 (PST) Sender: Guenter Roeck From: Guenter Roeck To: Shuah Khan Cc: Christian Brauner , Elizabeth Figura , Thomas Gleixner , Eric Dumazet , Jakub Kicinski , Kees Cook , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, wine-devel@winehq.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Guenter Roeck Subject: [PATCH 08/13] selftests: net: netlink-dumps: Avoid uninitialized variable error Date: Thu, 4 Dec 2025 08:17:22 -0800 Message-ID: <20251204161729.2448052-9-linux@roeck-us.net> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20251204161729.2448052-1-linux@roeck-us.net> References: <20251204161729.2448052-1-linux@roeck-us.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Building netlink-dumps with -Werror results in netlink-dumps.c: In function =E2=80=98dump_extack=E2=80=99: ../kselftest_harness.h:788:35: error: =E2=80=98ret=E2=80=99 may be used uni= nitialized Problem is that the loop which initializes 'ret' may exit early without initializing the variable if recv() returns an error. Always initialize 'ret' to solve the problem. Signed-off-by: Guenter Roeck --- tools/testing/selftests/net/netlink-dumps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/netlink-dumps.c b/tools/testing/se= lftests/net/netlink-dumps.c index 7618ebe528a4..f4fc0c9910f2 100644 --- a/tools/testing/selftests/net/netlink-dumps.c +++ b/tools/testing/selftests/net/netlink-dumps.c @@ -112,7 +112,7 @@ static const struct { TEST(dump_extack) { int netlink_sock; - int i, cnt, ret; + int i, cnt, ret =3D FOUND_ERR; char buf[8192]; int one =3D 1; ssize_t n; --=20 2.43.0