From nobody Mon Nov 25 04:58:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1715646757; cv=none; d=zohomail.com; s=zohoarc; b=S57xB6jaL1g/VkGm5ZuOgRVGJeR1SY/xhL7d6u6RAKjtkIeAdBKyp9/cupV1F4PgFAdGyc+JqDFzmuVgeQEArUnRY36fP2+MPnqz7xKysBzsKQOdMFDgW3vZm2aXJ0tpwWg2cbu3Dm5AdTXf2skzndCf6BPRXp+V4mQpBShRRow= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715646757; h=Content-Type:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=QCNdQc5AtZIJGSQL27GoqY4VMi3l5qF+Bg7VPEzWdaw=; b=U63xhkyfYYPHSk6jS1LBAJnPS9nNoqw0wj72+QjjIpVxjyeD8BNB2HPxTrH9nouYLlDJbEVcoE6ILj1N96yi0AZh8Jo+h2+XPijwNhLiJ6/hVGblKKL3xY3ospTxo644BSl+IXSQRiucpz5yG0WxKS4UcfQ6x0X0kbglk2RQiOg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1715646757073113.49675867745407; Mon, 13 May 2024 17:32:37 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.721114.1124262 (Exim 4.92) (envelope-from ) id 1s6g5X-00040q-B9; Tue, 14 May 2024 00:32:15 +0000 Received: by outflank-mailman (output) from mailman id 721114.1124262; Tue, 14 May 2024 00:32:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s6g5X-00040j-80; Tue, 14 May 2024 00:32:15 +0000 Received: by outflank-mailman (input) for mailman id 721114; Tue, 14 May 2024 00:32:13 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s6g5V-00040d-Nm for xen-devel@lists.xenproject.org; Tue, 14 May 2024 00:32:13 +0000 Received: from sin.source.kernel.org (sin.source.kernel.org [2604:1380:40e1:4800::1]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 65fffe14-1189-11ef-b4bb-af5377834399; Tue, 14 May 2024 02:32:11 +0200 (CEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 93397CE0FA4; Tue, 14 May 2024 00:32:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5AF4C113CC; Tue, 14 May 2024 00:32:04 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 65fffe14-1189-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715646725; bh=H78/7RklkbUxxfqv1CXgGuILJwFQYgVzwrybslal0WI=; h=Date:From:To:cc:Subject:From; b=m6lUVAmZkStl1bWmJ+nltMt0IKuXWwRFgyClzrLxt73uNe08ObIODo/pqqfhXCjp9 4fL87XZT62qAAMzYnc72s9feXjLs+9rU8GaJw6UfdA5Dl/yWChdQdjmP6YQH0P3Gsg e5EcxkbkCO/jgB8UFNyhF7OKGpO0VdxSc+T1PGqCKtAkGHe+fIJVNcaSGIfP0I8Iph 1g6wSx9pvkE51RXgikQOe6ZOQX9mJ4CG1RJMvQKwhTsFQ7BFLBwYTBER3uTurZpXMM WgvNHNzB1O1nQX+Q0LE+DHLNPI7MnNSfalTkm2VlpgQdIWNjcmWYI8UBzczNTUhN1f 2n2+Mql5hhWyA== Date: Mon, 13 May 2024 17:32:03 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@ubuntu-linux-20-04-desktop To: xen-devel@lists.xenproject.org cc: sstabellini@kernel.org, =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , jbeulich@suse.com, Andrew Cooper , Bertrand Marquis , Michal Orzel , Julien Grall Subject: [PATCH] lib/strtoul: fix MISRA R10.2 violation Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1715646758690100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Fix last violation of R10.2 by casting the result of toupper to plain char. Note that we don't want to change toupper itself as it is a legacy interface and it would cause more issues. Signed-off-by: Stefano Stabellini --- I believe this is the last R10.2 violation diff --git a/xen/lib/strtoul.c b/xen/lib/strtoul.c index a378fe735e..345dcf9d8c 100644 --- a/xen/lib/strtoul.c +++ b/xen/lib/strtoul.c @@ -38,7 +38,7 @@ unsigned long simple_strtoul( =20 while ( isxdigit(*cp) && (value =3D isdigit(*cp) ? *cp - '0' - : toupper(*cp) - 'A' + 10) < base ) + : (char)toupper(*cp) - 'A' + 10) < base ) { result =3D result * base + value; cp++;