Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Nov 2015 13:47:31 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r291205 - stable/10/sys/dev/usb/input
Message-ID:  <201511231347.tANDlVuT080308@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon Nov 23 13:47:31 2015
New Revision: 291205
URL: https://svnweb.freebsd.org/changeset/base/291205

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/10/sys/dev/usb/input/uhid.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/usb/input/uhid.c
==============================================================================
--- stable/10/sys/dev/usb/input/uhid.c	Mon Nov 23 13:44:25 2015	(r291204)
+++ stable/10/sys/dev/usb/input/uhid.c	Mon Nov 23 13:47:31 2015	(r291205)
@@ -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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511231347.tANDlVuT080308>