From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id w9kXMmq1R2oQuCMAWB0awg (envelope-from ) for ; Fri, 03 Jul 2026 09:13:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1783084394; bh=itRtMTobyaflhy6wPk8xx98AD7+cRDmXIaJ5Hb7ZNTs=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BI7vozW8UWcxrzh+S5eohUKzHybouqDmcP3FWjLt3G3YI2iP4s22e5sGutrVQOmZi hT+hdfx25FJcB0eBW0b665WIKsNdbnfzDLHmLzanGlGyqdFBWvJCBnI9cyeaLMs2qz aArHOlltuWzJDHFUc7FGx3FB3s9JsAzkXNoldrYA= Received: by simark.ca (Postfix, from userid 112) id BF7A51E024; Fri, 03 Jul 2026 09:13:14 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=wETxh/8x; dkim-atps=neutral Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 547071E024 for ; Fri, 03 Jul 2026 09:13:14 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 04D3C4BA2E15 for ; Fri, 3 Jul 2026 13:13:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04D3C4BA2E15 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=wETxh/8x Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id A85634BA2E1A for ; Fri, 3 Jul 2026 13:12:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A85634BA2E1A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A85634BA2E1A Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783084364; cv=none; b=Pwp2LrzalLF7wyunc4RMJ+jq0H2cduvr3/T1Q+dbpIYDTgMegy6r5kwloN6452q15yjHkzpONierWTgn7dL8sNIkFMQi4sGZKaIHm9DBvOjwpw3prCbpk1IkXsFXky2lkeIRVzLoihUMaz/xC+CD4JDFSY/oWZXutg/Rz2qawcY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783084364; c=relaxed/simple; bh=itRtMTobyaflhy6wPk8xx98AD7+cRDmXIaJ5Hb7ZNTs=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=G0x6B82cdeOesXx4p4SJOgRL8X0S1kOD9kGpqdLSUZseYPaaxEgCxfK17oOMwgY1lvMZLrEaiXH3Y1ogCNN7ErmsxWP3e3400H0xzt2/3goeLsN9VuCto5WtCY/kD7ZiHPPNps57Xm3YX7S/RZQ+2DGH+id2JQIobfs813oLF/g= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=wETxh/8x DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A85634BA2E1A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1783084364; bh=itRtMTobyaflhy6wPk8xx98AD7+cRDmXIaJ5Hb7ZNTs=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=wETxh/8xwJuOM3nPLs5Gj/IZad9HjHSVJ0dohVhDxbendkoEHviG9tSM5fc76QDU8 52gaOTNI40jpVNUDyUYIUluBXUQEKT/9u3pHpIlwmvfEYstSsBYRK7PxoNIhttn5Xj aT/wo1wTGzoJIE61KODs2FIVW6gx6Fx/nZyjtphw= Received: by simark.ca (Postfix) id 50A901E024; Fri, 03 Jul 2026 09:12:44 -0400 (EDT) Message-ID: <756f19a3-7341-486a-a0cd-00d97634595e@simark.ca> Date: Fri, 3 Jul 2026 09:12:44 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] gdb, amd-dbgapi-target: use '%u' instead of '%d' in wave_coordinates::to_string To: Tankut Baris Aktemur , gdb-patches@sourceware.org Cc: lancelot.six@amd.com References: <20260703125058.1828518-1-tankutbaris.aktemur@amd.com> Content-Language: fr From: Simon Marchi In-Reply-To: <20260703125058.1828518-1-tankutbaris.aktemur@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 7/3/26 8:50 AM, Tankut Baris Aktemur wrote: > The group id coordinates and the wave number in workgroup that are > being formatted to a string in wave_coordinates::to_string are > unsigned values. Use '%u' instead of '%d'. Do we get a compiler warning for this? Or do they warn only if there is a size mismatch, not a sign mismatch? > --- > gdb/amd-dbgapi-target.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gdb/amd-dbgapi-target.c b/gdb/amd-dbgapi-target.c > index caae9a98501..923b790664e 100644 > --- a/gdb/amd-dbgapi-target.c > +++ b/gdb/amd-dbgapi-target.c > @@ -406,12 +406,12 @@ wave_coordinates::to_string () const > str += string_printf (":%s", pulongest (wave_id.handle)); > > str += (group_ids[0] != UINT32_MAX > - ? string_printf (" (%d,%d,%d)", group_ids[0], group_ids[1], > + ? string_printf (" (%u,%u,%u)", group_ids[0], group_ids[1], > group_ids[2]) > : " (?,?,?)"); > > str += (wave_in_group != UINT32_MAX > - ? string_printf ("/%d", wave_in_group) > + ? string_printf ("/%u", wave_in_group) > : "/?"); All these are std::uint32_t, so we should probably use PRIu32 (or pulongest). Simon