From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 96A2F1FF39F for ; Mon, 10 Jun 2024 10:53:12 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 97138126EF; Mon, 10 Jun 2024 10:53:46 +0200 (CEST) Mime-Version: 1.0 Date: Mon, 10 Jun 2024 10:53:13 +0200 Message-Id: From: "Shannon Sterz" To: "Jing Luo" , X-Mailer: aerc 0.17.0-69-g65571b67d7d3-dirty References: <20240607094734.3883693-1-jing@jing.rocks> In-Reply-To: <20240607094734.3883693-1-jing@jing.rocks> X-SPAM-LEVEL: Spam detection results: 0 AWL -0.057 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pve-devel] [PATCH pve-qemu-kvm] patch: pbs block driver: correct a data type X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" On Fri Jun 7, 2024 at 11:43 AM CEST, Jing Luo wrote: > gcc warns (-Werror=type-limits) that it will always be false for the > if statement. This is because here s->aid is defined as char, while > proxmox_restore_open_image() returns an int. Change the type to int. > Strangely gcc warns it on arm64 build but not amd64 build... probably because char is unsigned on arm architectures (usually), but signed on x86 [1]: > Although the ARM architecture has the LDRSB instruction, that loads a > signed byte into a 32-bit register with sign extension, the earliest > versions of the architecture did not. It made sense at the time for > the compiler to treat simple chars as unsigned, whereas on the x86 > simple chars are, by default, treated as signed. [1]: https://developer.arm.com/documentation/den0013/d/Porting/Miscellaneous-C-porting-issues/unsigned-char-and-signed-char > > Signed-off-by: Jing Luo > --- > ...2-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/debian/patches/pve/0032-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch b/debian/patches/pve/0032-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch > index b9578ba..9e68167 100644 > --- a/debian/patches/pve/0032-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch > +++ b/debian/patches/pve/0032-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch > @@ -68,7 +68,7 @@ index 0000000000..dd72356bd3 > + > +typedef struct { > + ProxmoxRestoreHandle *conn; > -+ char aid; > ++ int aid; > + int64_t length; > + > + char *repository; _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel