bin/163774: [patch] add missing format strings to warn*(3) calls in
camcontrol(8)
Garrett Cooper
yanegomi at gmail.com
Mon Jan 2 11:20:09 UTC 2012
>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 at 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:
More information about the freebsd-bugs
mailing list