mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-07-09 02:39:42 +00:00
hidapi: Ignore enum-enum-conversion warnings in libusb hid.c which requires mixing enum bitmasks
SDL3/src/hidapi/libusb/hid.c:711:62: error: bitwise operation between different enumeration types ('enum libusb_endpoint_direction' and 'enum libusb_request_recipient') [-Werror,-Wenum-enum-conversion]
711 | int res = libusb_control_transfer(handle, LIBUSB_ENDPOINT_IN|LIBUSB_RECIPIENT_INTERFACE, LIBUSB_REQUEST_GET_DESCRIPTOR, (LIBUSB_DT_REPORT << 8), (uint16_t)interface_num, tmp, expected_report_descriptor_size, 5000);
This commit is contained in:
@@ -76,6 +76,11 @@ extern "C" {
|
||||
#pragma warning(disable:5287) /* operands are different enum types */
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wenum-enum-conversion"
|
||||
#endif
|
||||
|
||||
/* Uncomment to enable the retrieval of Usage and Usage Page in
|
||||
hid_enumerate(). Warning, on platforms different from FreeBSD
|
||||
this is very invasive as it requires the detach
|
||||
@@ -2274,6 +2279,10 @@ uint16_t get_usb_code_for_current_locale(void)
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user