From nobody Sun Apr 26 23:03:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3j0c3Ctzz6bBNF for ; Sun, 26 Apr 2026 23:03:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3j0c2TMMz42tm for ; Sun, 26 Apr 2026 23:03:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777244592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3wcAy1Dw11r/mBWXo8uhyMUJdgwNzWTyiFj4kRznVGI=; b=g3SCsWYirAS7bMX7FTCA0DdMu0TTlaNjzDVHBzYT08HUQ2rAI8qu/ntBUY4vuJW/sHIutW lBbDvr7g8Cnwhu3q5bEoZHABiqpi58hvh7HMaxprn0aIQYYh4NbT6cT5C6vv7R5qZE0naZ TODKeh0e2F72g8271BFRN/yWNFXfSMGuAjEGVCEpmeca3HJsKcvI1IVF2eR9UZK6REPM8n mH6niMemiGL4jxVNZNZ60YTmPUl2hNVG9cRLGvT5Oeyyw3C23Gto7yClL/vbbDDMT7J+ME 36tz+23MqZSI0FijbCoTqqVSuAHNDwYZ3WaMrMWixJk1Y/xdt/qgeO+dTTP8qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777244592; a=rsa-sha256; cv=none; b=KdhfkI5EuUjC4yGCc4LiYNv2BdeSMqxSzZf/RoHs/2vRm7kMla3GUcFGhw79dEV+WDTub8 4A/qQBhkVuQdxgmirENbq+dm0yMon5RQt7l/SVz/mWNuuQSowCplh3DNFSOmgq8N6WNM4X wez3O8fF9zeHHp8IVHSLiX4BOD+YI2VryJLoBUPPxHOgRChVn4g2zVuuumfSb/hLLBu67h M/t7qLH7FFPRZDglePadeX70GjneMebEYnEJTpbphSYHX7NGc6Y/gNbRcDjSXmia//AI+F VYhq985TH+rAW0ylinoLVdcBWjxDAMI9k4ltDdXHrtfzvQs6GzkbihR1F8xaew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777244592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3wcAy1Dw11r/mBWXo8uhyMUJdgwNzWTyiFj4kRznVGI=; b=vjkKDo5QBjBqdda2JIUb1WC9qxw9haNzR6odeLoCEBsq4FkGVow1xtWe1NmSc2ygAb8pyd 8legJcRG515frAwWGh6e5ovABjTJDE6IiP1TAEZYB0q9K7UD+7tia6Nh3petpLOxvlQRx+ 7H6itNUu98vdON3M32u7/A+pl5zGT6Hpn2bE0xAIQ/Sgm/+uh3URlAU6id5OkdlZgXy0/H N7fcH3OeC1En1uEzzkL45qSBKJ6vhEC0x70qlSfnJloxLWRKvSsHrCmh93Ac+seV9eTxEV QLJ3439984VaU148ODZtXSdOUfMOAwycvP2iggG8FrdiVBU+H+zla5vlwYpI8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3j0c20s9zhcy for ; Sun, 26 Apr 2026 23:03:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4659f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 26 Apr 2026 23:03:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 92e5f6e1995a - main - x86/ucode: fix gcc uninitialised warning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 92e5f6e1995acb10628ab210cc9f19dbf74f2948 Auto-Submitted: auto-generated Date: Sun, 26 Apr 2026 23:03:12 +0000 Message-Id: <69ee99b0.4659f.7edb9100@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=92e5f6e1995acb10628ab210cc9f19dbf74f2948 commit 92e5f6e1995acb10628ab210cc9f19dbf74f2948 Author: Adrian Chadd AuthorDate: 2026-04-26 23:03:02 +0000 Commit: Adrian Chadd CommitDate: 2026-04-26 23:03:02 +0000 x86/ucode: fix gcc uninitialised warning This fixes the case where selected_size is never set to anything in the loop. Whilst here, also set selected_fw to NULL so the case of "no firmware" correctly sets everything to NULL/0. ``` --- ucode_subr.o --- /workspace/src/sys/x86/x86/ucode_subr.c: In function 'ucode_amd_find': /workspace/src/sys/x86/x86/ucode_subr.c:237:25: warning: 'selected_size' may be used uninitialized [-Wmaybe-uninitialized] 237 | *selected_sizep = selected_size; | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ / workspace/src/sys/x86/x86/ucode_subr.c:105:16: note: 'selected_size' was declared here 105 | size_t selected_size; | ^~~~~~~~~~~~~ ``` Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D55439 --- sys/x86/x86/ucode_subr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/x86/x86/ucode_subr.c b/sys/x86/x86/ucode_subr.c index 53d7cfc06769..9536ed7b8f7b 100644 --- a/sys/x86/x86/ucode_subr.c +++ b/sys/x86/x86/ucode_subr.c @@ -98,11 +98,11 @@ ucode_amd_find(const char *path, uint32_t signature, uint32_t *revision, const uint8_t *fw_data, size_t fw_size, size_t *selected_sizep) { const amd_10h_fw_header_t *fw_header; - const amd_10h_fw_header_t *selected_fw; + const amd_10h_fw_header_t *selected_fw = NULL; const equiv_cpu_entry_t *equiv_cpu_table; const section_header_t *section_header; const container_header_t *container_header; - size_t selected_size; + size_t selected_size = 0; uint16_t equiv_id; int i;