]> xenbits.xensource.com Git - xen.git/commit
libs/vchan: Fix -Wsingle-bit-bitfield-constant-conversion
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 8 Aug 2023 13:53:42 +0000 (14:53 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 8 Aug 2023 13:53:42 +0000 (14:53 +0100)
commit3e23155743566e682404fadf81b58c44b4aa1cbf
tree598ee884af1957541943e6faf5a8dd1b57fc5c94
parent61678abb39f6c79a4fb003d6e279fd501b627c19
libs/vchan: Fix -Wsingle-bit-bitfield-constant-conversion

Gitlab reports:

  init.c:348:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
          ctrl->is_server = 1;
                          ^ ~
  1 error generated.
  make[6]: *** [/builds/xen-project/people/andyhhp/xen/tools/libs/vchan/../../../tools/Rules.mk:188: init.o] Error 1

In Xen 4.18, this was fixed with c/s 99ab02f63ea8 ("tools: convert bitfields
to unsigned type") but this is an ABI change which can't be backported.

Swich 1 for -1 to provide a minimally invasive way to fix the build.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libs/vchan/init.c