api: fix signed single bit field 07/39207/1
authorTianyu Li <tianyu.li@arm.com>
Fri, 7 Jul 2023 06:47:56 +0000 (06:47 +0000)
committerTianyu Li <tianyu.li@arm.com>
Fri, 7 Jul 2023 10:06:15 +0000 (18:06 +0800)
clang-16 complains about signed one-bit bitfield value
changes from 1 to -1. Use unsigned type instead.

Type: fix
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: Iab006c036d4068af2fe3caaefc871a95b26cc578

src/vlibapi/api_common.h

index d644d93..6311724 100644 (file)
@@ -127,11 +127,11 @@ typedef struct
   void *fromjson;              /**< JSON to binary convert function */
   void *calc_size;             /**< message size calculation */
   int size;                    /**< message size  */
-  int traced : 1;              /**< is this message to be traced?  */
-  int replay : 1;              /**< is this message to be replayed?  */
-  int message_bounce : 1;      /**< do not free message after processing */
-  int is_mp_safe : 1;          /**< worker thread barrier required?  */
-  int is_autoendian : 1;       /**< endian conversion required?  */
+  u32 traced : 1;              /**< is this message to be traced?  */
+  u32 replay : 1;              /**< is this message to be replayed?  */
+  u32 message_bounce : 1;      /**< do not free message after processing */
+  u32 is_mp_safe : 1;          /**< worker thread barrier required?  */
+  u32 is_autoendian : 1;       /**< endian conversion required?  */
 } vl_msg_api_msg_config_t;
 
 /** Message header structure */