From patchwork Fri Dec 4 06:32:16 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 107260 Received: from mail-dy1-f174.google.com (mail-dy1-f174.google.com [74.125.82.174]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.2481.1796365941858451690 for ; Thu, 03 Dec 2026 22:32:21 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20260707 header.b=zVPxWlzw; spf=pass (domain: gmail.com, ip: 74.125.82.174, mailfrom: raj.khem@gmail.com) Received: by mail-dy1-f174.google.com with SMTP id 5a478bee46e88-387486ad5abso673252eec.0 for ; Thu, 03 Dec 2026 22:32:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796365941; x=1796970741; darn=lists.openembedded.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:content-type; bh=u3LnmhXGUGR6ZvOGlEPgV/tGTmWsx6zbWMm0gUiyY1Q=; b=zVPxWlzw2FqEv8j+XNmHvOkV4tXoftGVBuBbGqfRIcH5iIHNwLRcRJLBEthTU0hMgt yvjxCeAd9sX79Vem2Ppl/Rj4To+19gJXXocifmLcek8zH50AhOHadsDkUn+FUtB+rgKm O5cxChdLPqRAe+ShSb4PswdYCpLHe1Zb54A40GZLNHh4peBPldYxU6lr11hUDo/4PlD8 NKU/0Pb/DFF3tgKISN68Vq5dHfky6txRYcbRgxrbSULYzie5Ikp6Xtbf34wkC+tIvBFo OsjUteLciSwEcpTbEvNsFILlcl66jrmyRQjcitT29Uhv19/DtaDatWOQxZ8kAXBQGzcy NDEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796365941; x=1796970741; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x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kRvY8uffMiCsLiIznx+vuKO387luHlIO I/QYe4F1PikJ8qVFCFPwuSN90wBh4cFnmPU654/SDClcoAdEVGGm1szTXXhV9py1zej8hN9W0fU hL7PTc2bPlOkVyw7b6D54u0qf42bsW/lFa9K+Oon/YSx15DWb6k4IG5m7vnqCpsUk63foq2CEol 5+NGdAAMT12cVm2+lbEXHpws0MYEqQ1zBBfXJCScmGn1kiIGWUUsehRP+n4zXll8tXdU9Wbvy2N Yh4L7wZns1HaEQ1DivwEm1y0hImI05CUK8dt1qW0qUkHcYMfHPEi1S5l+qjBqz57BiDJcbg/A6Y J5xWB5o5xrzHNbKFZoA9/UurCr7DIw6w8j9mHEFp41vzdkKnK4jkH5QpgmJ0ulGCjROjkCl/OTd QQPl X-Received: by 2002:a05:693c:83da:20b0:386:95e7:8497 with SMTP id 5a478bee46e88-387521cb576mr1106181eec.28.1796365941100; Thu, 03 Dec 2026 22:32:21 -0800 (PST) Return-Path: Received: from apollo.tail3ccdd3.ts.net ([147.160.63.35]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-387521c17a3sm5480707eec.11.2026.12.03.22.32.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 22:32:20 -0800 (PST) From: Khem Raj X-Google-Original-From: Khem Raj To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 2/2] venus-protocol: Fix tests build with clang Date: Thu, 3 Dec 2026 22:32:16 -0800 Message-ID: <20261204063216.2449490-2-khem.raj@oss.qualcomm.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204063216.2449490-1-khem.raj@oss.qualcomm.com> References: <20261204063216.2449490-1-khem.raj@oss.qualcomm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Fri, 04 Dec 2026 06:32:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251938 The generated reply sizeof helpers pass the address of an uninitialized return value to vn_sizeof_(). Newer clang reports this with -Wuninitialized-const-pointer, and since the project builds with werror=true, the tests fail to compile: error: variable 'ret' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer] Initialize the value in the generator templates. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj --- ...ize-ret-before-passing-it-to-vn_size.patch | 46 +++++++++++++++++++ .../mesa/venus-protocol_1.1.3.bb | 4 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-graphics/mesa/venus-protocol/0001-templates-Initialize-ret-before-passing-it-to-vn_size.patch diff --git a/meta/recipes-graphics/mesa/venus-protocol/0001-templates-Initialize-ret-before-passing-it-to-vn_size.patch b/meta/recipes-graphics/mesa/venus-protocol/0001-templates-Initialize-ret-before-passing-it-to-vn_size.patch new file mode 100644 index 0000000000..92eb5af20f --- /dev/null +++ b/meta/recipes-graphics/mesa/venus-protocol/0001-templates-Initialize-ret-before-passing-it-to-vn_size.patch @@ -0,0 +1,46 @@ +From f5e47d072ac0edb18e454bbec489ecc8e1af0cf7 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 3 Dec 2026 19:54:38 -0800 +Subject: [PATCH] templates: Initialize ret before passing it to vn_sizeof_*() + +The generated vn_sizeof_*_reply() and vn_decode_*_args_temp() helpers +declare the return value and pass its address to vn_sizeof_() +without initializing it. Newer clang (seen with clang 23) reports this +with -Wuninitialized-const-pointer, and the tests fail to build because +the project sets werror=true: + + error: variable 'ret' is uninitialized when passed as a const pointer + argument here [-Werror,-Wuninitialized-const-pointer] + cmd_size += vn_sizeof_VkResult(&ret); + +The value is never read, only its size is used. Initialize it to 0; +all command return types are scalars or function pointers. + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/virgl/venus-protocol/-/merge_requests/128] +Signed-off-by: Khem Raj +--- + templates/types_command.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/templates/types_command.h b/templates/types_command.h +index 7c20641..148f196 100644 +--- a/templates/types_command.h ++++ b/templates/types_command.h +@@ -40,7 +40,7 @@ static inline void vn_decode_${ty.name}_args_temp(struct vn_cs_decoder *dec, str + size_t offset = vn_sizeof_VkCommandTypeEXT(&cmd_type); + % if ty.ret: + +- ${ty.ret.to_c()}; ++ ${ty.ret.to_c()} = 0; + ${GEN.sizeof_command_reply(ty, ty.ret, '', 'offset')} + % endif + % for var in ty.variables: +@@ -64,7 +64,7 @@ static inline size_t vn_sizeof_${ty.name}_reply(${ty.c_func_params()}) + size_t cmd_size = vn_sizeof_VkCommandTypeEXT(&cmd_type); + + % if ty.ret: +- ${ty.ret.to_c()}; ++ ${ty.ret.to_c()} = 0; + ${GEN.sizeof_command_reply(ty, ty.ret, '', 'cmd_size')} + % endif + % for var in ty.variables: diff --git a/meta/recipes-graphics/mesa/venus-protocol_1.1.3.bb b/meta/recipes-graphics/mesa/venus-protocol_1.1.3.bb index e7701a76f6..80699394d7 100644 --- a/meta/recipes-graphics/mesa/venus-protocol_1.1.3.bb +++ b/meta/recipes-graphics/mesa/venus-protocol_1.1.3.bb @@ -12,7 +12,9 @@ LICENSE = "MIT AND (Apache-2.0 OR MIT)" LIC_FILES_CHKSUM = "file://meson.build;beginline=1;endline=2;md5=7e736041c5167e57165490a93689761e \ file://xmls/vk.xml;beginline=4;endline=5;md5=6784716613b13820761ca251591ef4e1" -SRC_URI = "git://gitlab.freedesktop.org/virgl/venus-protocol.git;protocol=https;branch=main;tag=v${PV}" +SRC_URI = "git://gitlab.freedesktop.org/virgl/venus-protocol.git;protocol=https;branch=main;tag=v${PV} \ + file://0001-templates-Initialize-ret-before-passing-it-to-vn_size.patch \ + " SRCREV = "ca19b6358d7cc491bc3e4de76f04c6700876a8fa" DEPENDS = "python3-mako-native"