]> xenbits.xensource.com Git - xen.git/commitdiff
tools: convert bitfields to unsigned type
authorOlaf Hering <olaf@aepfle.de>
Mon, 17 Jul 2023 06:32:19 +0000 (08:32 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 17 Jul 2023 06:32:19 +0000 (08:32 +0200)
clang complains about the signed type:

implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Backport: Dropped the libxenvchan change, for the original commit saying

"The potential ABI change in libxenvchan is covered by the Xen version
 based SONAME."

which won't hold on stable trees.
master commit: 99ab02f63ea813f2e467a39a7736bf460a3f3495
master date: 2023-05-16 20:03:02 +0100

tools/xentrace/xenalyze.c

index 5de167031e01d73a7e3fdfa1b8bd67352b2b45d9..e7ec284eeaade42ae77a3b5917a804574afd4adb 100644 (file)
@@ -1377,7 +1377,7 @@ struct hvm_data {
     tsc_t exit_tsc, arc_cycles, entry_tsc;
     unsigned long long rip;
     unsigned exit_reason, event_handler;
-    int short_summary_done:1, prealloc_unpin:1, wrmap_bf:1;
+    unsigned int short_summary_done:1, prealloc_unpin:1, wrmap_bf:1;
 
     /* Immediate processing */
     void *d;
@@ -8235,13 +8235,13 @@ void mem_set_p2m_entry_process(struct pcpu_info *p)
 
     struct {
         uint64_t gfn, mfn;
-        int p2mt;
-        int d:16,order:16;
+        uint32_t p2mt;
+        uint16_t d, order;
     } *r = (typeof(r))ri->d;
 
     if ( opt.dump_all )
     {
-        printf(" %s set_p2m_entry d%d o%d t %d g %llx m %llx\n",
+        printf(" %s set_p2m_entry d%u o%u t %u g %llx m %llx\n",
                ri->dump_header,
                r->d, r->order,
                r->p2mt,