[PATCH v2 0/3] hw/usb/dev-uas: Fix Clang 11 -Wgnu-variable-sized-type-not-at-end error

Philippe Mathieu-Daudé posted 3 patches 3 years, 3 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210120153522.1173897-1-philmd@redhat.com
include/scsi/utils.h | 22 ++++++++++++----------
hw/usb/dev-uas.c     | 12 +++++++++++-
scsi/utils.c         | 25 +++++++++++++++----------
3 files changed, 38 insertions(+), 21 deletions(-)
[PATCH v2 0/3] hw/usb/dev-uas: Fix Clang 11 -Wgnu-variable-sized-type-not-at-end error
Posted by Philippe Mathieu-Daudé 3 years, 3 months ago
Another attempt to fix the following Clang 11 warning:

  usb/dev-uas.c:157:31: error: field 'status' with variable sized type 'uas_i=
u' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-vari=
able-sized-type-not-at-end]
      uas_iu                    status;
                                ^
If a guest send a packet with additional data, respond
with "Invalid Request - parameter not supported".

v2: Include Eric feedbacks

Philippe Mathieu-Daud=C3=A9 (3):
  scsi/utils: Rename 'illegal request' -> 'invalid request'
  scsi/utils: Add INVALID_PARAM_VALUE sense code definition
  hw/usb/dev-uas: Report command additional adb length as unsupported

 include/scsi/utils.h | 22 ++++++++++++----------
 hw/usb/dev-uas.c     | 12 +++++++++++-
 scsi/utils.c         | 25 +++++++++++++++----------
 3 files changed, 38 insertions(+), 21 deletions(-)

--=20
2.26.2