From 620d4f3c0bbe724386cce86ca899c11b71e1a930 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 31 Jan 2015 14:18:46 +0000 Subject: [PATCH] Fix a bunch of -Wcast-qual warnings in sys/dev/usb/input/uhid.c, by using __DECONST. No functional change. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D1743 --- sys/dev/usb/input/uhid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/usb/input/uhid.c b/sys/dev/usb/input/uhid.c index 02642a00b8b9..ece5e9573309 100644 --- a/sys/dev/usb/input/uhid.c +++ b/sys/dev/usb/input/uhid.c @@ -734,7 +734,7 @@ uhid_attach(device_t dev) if (uaa->info.idProduct == USB_PRODUCT_WACOM_GRAPHIRE) { sc->sc_repdesc_size = sizeof(uhid_graphire_report_descr); - sc->sc_repdesc_ptr = (void *)&uhid_graphire_report_descr; + sc->sc_repdesc_ptr = __DECONST(void *, &uhid_graphire_report_descr); sc->sc_flags |= UHID_FLAG_STATIC_DESC; } else if (uaa->info.idProduct == USB_PRODUCT_WACOM_GRAPHIRE3_4X5) { @@ -755,7 +755,7 @@ uhid_attach(device_t dev) usbd_errstr(error)); } sc->sc_repdesc_size = sizeof(uhid_graphire3_4x5_report_descr); - sc->sc_repdesc_ptr = (void *)&uhid_graphire3_4x5_report_descr; + sc->sc_repdesc_ptr = __DECONST(void *, &uhid_graphire3_4x5_report_descr); sc->sc_flags |= UHID_FLAG_STATIC_DESC; } } else if ((uaa->info.bInterfaceClass == UICLASS_VENDOR) && @@ -775,7 +775,7 @@ uhid_attach(device_t dev) } /* the Xbox 360 gamepad has no report descriptor */ sc->sc_repdesc_size = sizeof(uhid_xb360gp_report_descr); - sc->sc_repdesc_ptr = (void *)&uhid_xb360gp_report_descr; + sc->sc_repdesc_ptr = __DECONST(void *, &uhid_xb360gp_report_descr); sc->sc_flags |= UHID_FLAG_STATIC_DESC; } if (sc->sc_repdesc_ptr == NULL) {