Author: hselasky
Date: Mon Nov 23 13:48:28 2015
New Revision: 291206
URL: https://svnweb.freebsd.org/changeset/base/291206

Log:
  MFC r277974:
  Fix a bunch of -Wcast-qual warnings in sys/dev/usb/input/uhid.c, by
  using __DECONST.  No functional change.
  
  Differential Revision: https://reviews.freebsd.org/D1743

Modified:
  stable/9/sys/dev/usb/input/uhid.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/usb/input/uhid.c
==============================================================================
--- stable/9/sys/dev/usb/input/uhid.c   Mon Nov 23 13:47:31 2015        
(r291205)
+++ stable/9/sys/dev/usb/input/uhid.c   Mon Nov 23 13:48:28 2015        
(r291206)
@@ -736,7 +736,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) {
@@ -757,7 +757,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) &&
@@ -777,7 +777,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) {
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to