From owner-svn-src-head@FreeBSD.ORG Sat May 25 17:09:59 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D978B51C; Sat, 25 May 2013 17:09:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CB863AAC; Sat, 25 May 2013 17:09:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4PH9xij015289; Sat, 25 May 2013 17:09:59 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4PH9xfv015285; Sat, 25 May 2013 17:09:59 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201305251709.r4PH9xfv015285@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 25 May 2013 17:09:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250986 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 May 2013 17:09:59 -0000 Author: hselasky Date: Sat May 25 17:09:58 2013 New Revision: 250986 URL: http://svnweb.freebsd.org/changeset/base/250986 Log: Fix some statical clang analyzer warnings. Modified: head/sys/dev/usb/usb_device.c head/sys/dev/usb/usb_hub.c head/sys/dev/usb/usb_msctest.c Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Sat May 25 16:58:12 2013 (r250985) +++ head/sys/dev/usb/usb_device.c Sat May 25 17:09:58 2013 (r250986) @@ -799,9 +799,6 @@ usb_config_parse(struct usb_device *udev /* find maximum number of endpoints */ if (ep_max < temp) ep_max = temp; - - /* optimalisation */ - id = (struct usb_interface_descriptor *)ed; } } Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Sat May 25 16:58:12 2013 (r250985) +++ head/sys/dev/usb/usb_hub.c Sat May 25 17:09:58 2013 (r250986) @@ -341,7 +341,6 @@ uhub_reattach_port(struct uhub_softc *sc DPRINTF("reattaching port %d\n", portno); - err = 0; timeout = 0; udev = sc->sc_udev; child = usb_bus_port_get_device(udev->bus, Modified: head/sys/dev/usb/usb_msctest.c ============================================================================== --- head/sys/dev/usb/usb_msctest.c Sat May 25 16:58:12 2013 (r250985) +++ head/sys/dev/usb/usb_msctest.c Sat May 25 17:09:58 2013 (r250986) @@ -802,7 +802,6 @@ usb_msc_eject(struct usb_device *udev, u if (sc == NULL) return (USB_ERR_INVAL); - err = 0; switch (method) { case MSC_EJECT_STOPUNIT: err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, @@ -844,6 +843,7 @@ usb_msc_eject(struct usb_device *udev, u break; default: DPRINTF("Unknown eject method (%d)\n", method); + err = 0; break; } DPRINTF("Eject CD command status: %s\n", usbd_errstr(err));