From owner-freebsd-bugs@FreeBSD.ORG Mon Jan 2 11:20:09 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F47310656AA for ; Mon, 2 Jan 2012 11:20:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5B5A48FC13 for ; Mon, 2 Jan 2012 11:20:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q02BK9Ys018027 for ; Mon, 2 Jan 2012 11:20:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q02BK9aJ018026; Mon, 2 Jan 2012 11:20:09 GMT (envelope-from gnats) Resent-Date: Mon, 2 Jan 2012 11:20:09 GMT Resent-Message-Id: <201201021120.q02BK9aJ018026@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Garrett Cooper Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1835106566B for ; Mon, 2 Jan 2012 11:11:56 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id CFBF38FC13 for ; Mon, 2 Jan 2012 11:11:56 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q02BBupq065144 for ; Mon, 2 Jan 2012 11:11:56 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q02BBuQU065143; Mon, 2 Jan 2012 11:11:56 GMT (envelope-from nobody) Message-Id: <201201021111.q02BBuQU065143@red.freebsd.org> Date: Mon, 2 Jan 2012 11:11:56 GMT From: Garrett Cooper To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/163774: [patch] add missing format strings to warn*(3) calls in camcontrol(8) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2012 11:20:09 -0000 >Number: 163774 >Category: bin >Synopsis: [patch] add missing format strings to warn*(3) calls in camcontrol(8) >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 02 11:20:09 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: 9.0-PRERELEASE >Organization: n/a >Environment: FreeBSD bayonetta.local 9.0-PRERELEASE FreeBSD 9.0-PRERELEASE #0 r229187M: Sun Jan 1 14:39:27 PST 2012 gcooper@bayonetta.local:/usr/obj/store/freebsd/stable/9/sys/BAYONETTA amd64 >Description: The attached patch fixes compilation warnings as camcontrol.c currently omits the format string qualifier in a number of locations. >How-To-Repeat: >Fix: Patch attached with submission follows: Index: sbin/camcontrol/camcontrol.c =================================================================== --- sbin/camcontrol/camcontrol.c (revision 229264) +++ sbin/camcontrol/camcontrol.c (working copy) @@ -966,9 +966,9 @@ const char error_string[] = "error getting transfer settings"; if (retval < 0) - warn(error_string); + warn("%s", error_string); else - warnx(error_string); + warnx("%s", error_string); if (arglist & CAM_ARG_VERBOSE) cam_error_print(device, ccb, CAM_ESF_ALL, @@ -2509,9 +2509,9 @@ const char warnstr[] = "error sending command"; if (retval < 0) - warn(warnstr); + warn("%s", warnstr); else - warnx(warnstr); + warnx("%s", warnstr); if (arglist & CAM_ARG_VERBOSE) { cam_error_print(device, ccb, CAM_ESF_ALL, @@ -3728,9 +3728,9 @@ const char errstr[] = "error sending format command"; if (retval < 0) - warn(errstr); + warn("%s", errstr); else - warnx(errstr); + warnx("%s", errstr); if (arglist & CAM_ARG_VERBOSE) { cam_error_print(device, ccb, CAM_ESF_ALL, @@ -4472,9 +4472,9 @@ const char warnstr[] = "error sending command"; if (retval < 0) - warn(warnstr); + warn("%s", warnstr); else - warnx(warnstr); + warnx("%s", warnstr); if (arglist & CAM_ARG_VERBOSE) { cam_error_print(device, ccb, CAM_ESF_ALL, @@ -4590,9 +4590,9 @@ const char warnstr[] = "error sending command"; if (retval < 0) - warn(warnstr); + warn("%s", warnstr); else - warnx(warnstr); + warnx("%s", warnstr); if (arglist & CAM_ARG_VERBOSE) { cam_error_print(device, ccb, CAM_ESF_ALL, @@ -4895,9 +4895,9 @@ const char warnstr[] = "error sending command"; if (retval < 0) - warn(warnstr); + warn("%s", warnstr); else - warnx(warnstr); + warnx("%s", warnstr); if (arglist & CAM_ARG_VERBOSE) { /* @@ -4977,9 +4977,9 @@ const char warnstr[] = "error sending command"; if (retval < 0) - warn(warnstr); + warn("%s", warnstr); else - warnx(warnstr); + warnx("%s", warnstr); if (arglist & CAM_ARG_VERBOSE) { cam_error_print(device, ccb, CAM_ESF_ALL, @@ -5374,9 +5374,9 @@ const char warnstr[] = "error sending command"; if (retval < 0) - warn(warnstr); + warn("%s", warnstr); else - warnx(warnstr); + warnx("%s", warnstr); if (arglist & CAM_ARG_VERBOSE) { cam_error_print(device, ccb, CAM_ESF_ALL, @@ -5454,9 +5454,9 @@ const char warnstr[] = "error sending command"; if (retval < 0) - warn(warnstr); + warn("%s", warnstr); else - warnx(warnstr); + warnx("%s", warnstr); if (arglist & CAM_ARG_VERBOSE) { cam_error_print(device, ccb, CAM_ESF_ALL, >Release-Note: >Audit-Trail: >Unformatted: