From owner-svn-src-projects@freebsd.org Fri Feb 19 16:37:07 2016 Return-Path: Delivered-To: svn-src-projects@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 E6521AAE12C for ; Fri, 19 Feb 2016 16:37:07 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B3A961F90; Fri, 19 Feb 2016 16:37:07 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1JGb6gl055075; Fri, 19 Feb 2016 16:37:06 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1JGb6lm055074; Fri, 19 Feb 2016 16:37:06 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201602191637.u1JGb6lm055074@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 19 Feb 2016 16:37:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r295812 - projects/mips64-clang/sys/mips/rmi X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2016 16:37:08 -0000 Author: sbruno Date: Fri Feb 19 16:37:06 2016 New Revision: 295812 URL: https://svnweb.freebsd.org/changeset/base/295812 Log: Change a static const string to a #define as the strcpy() throws a warn/error with clang. /home/sbruno/mips64-clang/sys/mips/rmi/xls_ehci.c:133:25: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] sprintf(sc->sc_vendor, xlr_vendor_desc); Modified: projects/mips64-clang/sys/mips/rmi/xls_ehci.c Modified: projects/mips64-clang/sys/mips/rmi/xls_ehci.c ============================================================================== --- projects/mips64-clang/sys/mips/rmi/xls_ehci.c Fri Feb 19 15:53:08 2016 (r295811) +++ projects/mips64-clang/sys/mips/rmi/xls_ehci.c Fri Feb 19 16:37:06 2016 (r295812) @@ -73,7 +73,7 @@ static device_attach_t ehci_xls_attach; static device_detach_t ehci_xls_detach; static const char *xlr_usb_dev_desc = "RMI XLR USB 2.0 controller"; -static const char *xlr_vendor_desc = "RMI Corp"; +#define XLR_VENDOR_DESC "RMI Corp"; static int ehci_xls_probe(device_t self) @@ -130,7 +130,7 @@ ehci_xls_attach(device_t self) device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); device_set_desc(sc->sc_bus.bdev, xlr_usb_dev_desc); - sprintf(sc->sc_vendor, xlr_vendor_desc); + sprintf(sc->sc_vendor, XLR_VENDOR_DESC); err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, NULL,