[PATCH] cpu_arm: fix the compile warning of unexpected format

Jiang Jiacheng posted 1 patch 1 year, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20221117021103.72959-1-jiangjiacheng@huawei.com
src/cpu/cpu_arm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] cpu_arm: fix the compile warning of unexpected format
Posted by Jiang Jiacheng 1 year, 5 months ago
These format are left unchanged when convert 'unsigned long' to
'unsigned long long', which caused compile warning.

Signed-off-by: Jiang Jiacheng <jiangjiacheng@huawei.com>
---
 src/cpu/cpu_arm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cpu/cpu_arm.c b/src/cpu/cpu_arm.c
index ef72d6dceb..3ec06edef4 100644
--- a/src/cpu/cpu_arm.c
+++ b/src/cpu/cpu_arm.c
@@ -639,7 +639,7 @@ virCPUarmDecode(virCPUDef *cpu,
 
     if (!(model = virCPUarmModelFindByPVR(map, cpuData->pvr))) {
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("Cannot find CPU model with PVR 0x%03lx"),
+                       _("Cannot find CPU model with PVR 0x%03llx"),
                        cpuData->pvr);
         return -1;
     }
@@ -656,7 +656,7 @@ virCPUarmDecode(virCPUDef *cpu,
     if (cpuData->vendor_id &&
         !(vendor = virCPUarmVendorFindByID(map, cpuData->vendor_id))) {
         virReportError(VIR_ERR_OPERATION_FAILED,
-                       _("Cannot find CPU vendor with vendor id 0x%02lx"),
+                       _("Cannot find CPU vendor with vendor id 0x%02llx"),
                        cpuData->vendor_id);
         return -1;
     }
-- 
2.33.0
Re: [PATCH] cpu_arm: fix the compile warning of unexpected format
Posted by Ján Tomko 1 year, 5 months ago
On a Thursday in 2022, Jiang Jiacheng wrote:
>These format are left unchanged when convert 'unsigned long' to
>'unsigned long long', which caused compile warning.
>
>Signed-off-by: Jiang Jiacheng <jiangjiacheng@huawei.com>
>---
> src/cpu/cpu_arm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano