[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v1] tools: convert bitfields to unsigned type


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Wed, 3 May 2023 15:01:42 +0000
  • Arc-authentication-results: i=1; strato.com; arc=none; dkim=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1683126114; s=strato-dkim-0002; d=strato.com; h=Message-Id:Date:Subject:Cc:To:From:Cc:Date:From:Subject:Sender; bh=n+NGG3DQPZc+9Rhhl9b5pYee5RxxjvFCd1OK5V3cABk=; b=tYOI7l4mnIlwWPP2R9bd0LxGM5EIKKxU/38cbULkB/wbY6q8PIA/d/GYi2Tmk+75Wn krowxG79KasyoaWG59yNEAxTuCH1HCC93uscrw8MgsM7pynAleOg8cnBDevFKERLG8V9 Ss4dPh8X8eju60Q5+wQY82FumUikBXi8Gk/vTftt0YBRhngzc47QKr6o07YRwo5fRTeE 43CaqutIvvFafc9K7rdMu98Lo7yJr0MtR/MUVMe8TxpIKzHAGnuo6GgnmgeDiVlzBi22 4bmxBBb0hmyPmYcwM/F4chhxZCBfuxwynQlKo7rU7SycmvD/DoUkxW6NQPOzibAdO5Pd L9jA==
  • Arc-seal: i=1; a=rsa-sha256; t=1683126114; cv=none; d=strato.com; s=strato-dkim-0002; b=an3Si/DZaCH9pneAM2ENpePOMfOaZa3AqjW2ZOatMWSZjVpyNM67SFvneQ2TG1R6ns a5/y296PLUGefDtOel9H0Bq5qpvuUtrYPl45LiYkjVwoqxAPGDDMU9oLbiqiadRX9WBN a45gNROs6dbRgLUxkpXqEHd2G3El65Ye1VtPO1rA2rf2JmhT6zLsa5Q/5vUqtMYLnI1J NR4rSCzfSLzIRE/JRglCKKYZhBH8+PBk63G2Zwl+hiKsZLDgE7OracoM25zD9jw0vqu4 GPSfrIt9CBsjPX3r1lYpcLpGbVdPXLuEyFLl9mxweE4KqcK+4wA7BFPyFOx1GbmX3Hdm uXZg==
  • Cc: Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>
  • Delivery-date: Wed, 03 May 2023 15:02:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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]

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

The xenalyze change follows the existing pattern in that file.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
 tools/include/libxenvchan.h | 6 +++---
 tools/xentrace/xenalyze.c   | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/include/libxenvchan.h b/tools/include/libxenvchan.h
index 30cc73cf97..3d3b8aa8dd 100644
--- a/tools/include/libxenvchan.h
+++ b/tools/include/libxenvchan.h
@@ -79,11 +79,11 @@ struct libxenvchan {
        xenevtchn_handle *event;
        uint32_t event_port;
        /* informative flags: are we acting as server? */
-       int is_server:1;
+       unsigned int is_server:1;
        /* true if server remains active when client closes (allows 
reconnection) */
-       int server_persist:1;
+       unsigned int server_persist:1;
        /* true if operations should block instead of returning 0 */
-       int blocking:1;
+       unsigned int blocking:1;
        /* communication rings */
        struct libxenvchan_ring read, write;
        /**
diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c
index 12dcca9646..1b4a188aaa 100644
--- a/tools/xentrace/xenalyze.c
+++ b/tools/xentrace/xenalyze.c
@@ -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 short_summary_done:1, prealloc_unpin:1, wrmap_bf:1;
 
     /* Immediate processing */
     void *d;



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.