From owner-svn-src-stable@freebsd.org Wed Aug 5 18:52:41 2015 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC2BA9B481F; Wed, 5 Aug 2015 18:52:41 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCC8BD96; Wed, 5 Aug 2015 18:52:41 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t75IqfGG072948; Wed, 5 Aug 2015 18:52:41 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t75Iqfuv072947; Wed, 5 Aug 2015 18:52:41 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201508051852.t75Iqfuv072947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 5 Aug 2015 18:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r286333 - stable/10/lib/libusb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2015 18:52:42 -0000 Author: pfg Date: Wed Aug 5 18:52:40 2015 New Revision: 286333 URL: https://svnweb.freebsd.org/changeset/base/286333 Log: MFC r285720: libusb: Fix minor warning. Fix a warning triggered by the gcc + FORTIFY_SOURCE patches: In function 'libusb20_parse_config_desc': lib/libusb/libusb20_desc.c:141: warning: passing argument 1 of 'memcpy' discards qualifiers from pointer target type Submitted by: hselansky Modified: stable/10/lib/libusb/libusb20_desc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libusb/libusb20_desc.c ============================================================================== --- stable/10/lib/libusb/libusb20_desc.c Wed Aug 5 18:30:00 2015 (r286332) +++ stable/10/lib/libusb/libusb20_desc.c Wed Aug 5 18:52:40 2015 (r286333) @@ -137,15 +137,13 @@ libusb20_parse_config_desc(const void *c * Make a copy of the config descriptor, so that the caller can free * the inital config descriptor pointer! */ - ptr = (void *)(lub_endpoint + nendpoint); - memcpy(LIBUSB20_ADD_BYTES(ptr, 0), config_desc, pcdesc.len); + memcpy((void *)(lub_endpoint + nendpoint), config_desc, pcdesc.len); + + ptr = (const void *)(lub_endpoint + nendpoint); pcdesc.ptr = LIBUSB20_ADD_BYTES(ptr, 0); - config_desc = LIBUSB20_ADD_BYTES(ptr, 0); /* init config structure */ - ptr = config_desc; - LIBUSB20_INIT(LIBUSB20_CONFIG_DESC, &lub_config->desc); if (libusb20_me_decode(ptr, ptr[0], &lub_config->desc)) {