Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Dec 2011 22:35:20 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r228602 - head/sbin/camcontrol
Message-ID:  <201112162235.pBGMZK2k029887@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Fri Dec 16 22:35:19 2011
New Revision: 228602
URL: http://svn.freebsd.org/changeset/base/228602

Log:
  In sbin/camcontrol/camcontrol.c, fix a few warnings about format strings
  not being literals.
  
  MFC after:	1 week

Modified:
  head/sbin/camcontrol/camcontrol.c

Modified: head/sbin/camcontrol/camcontrol.c
==============================================================================
--- head/sbin/camcontrol/camcontrol.c	Fri Dec 16 22:19:13 2011	(r228601)
+++ head/sbin/camcontrol/camcontrol.c	Fri Dec 16 22:35:19 2011	(r228602)
@@ -2506,7 +2506,7 @@ scsicmd(struct cam_device *device, int a
 
 	if (((retval = cam_send_ccb(device, ccb)) < 0)
 	 || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) {
-		const char *warnstr = "error sending command";
+		const char warnstr[] = "error sending command";
 
 		if (retval < 0)
 			warn(warnstr);
@@ -4449,7 +4449,7 @@ smpcmd(struct cam_device *device, int ar
 
 	if (((retval = cam_send_ccb(device, ccb)) < 0)
 	 || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) {
-		const char *warnstr = "error sending command";
+		const char warnstr[] = "error sending command";
 
 		if (retval < 0)
 			warn(warnstr);
@@ -4567,7 +4567,7 @@ try_long:
 
 	if (((retval = cam_send_ccb(device, ccb)) < 0)
 	 || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) {
-		const char *warnstr = "error sending command";
+		const char warnstr[] = "error sending command";
 
 		if (retval < 0)
 			warn(warnstr);
@@ -4872,7 +4872,7 @@ smpphycontrol(struct cam_device *device,
 
 	if (((retval = cam_send_ccb(device, ccb)) < 0)
 	 || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) {
-		const char *warnstr = "error sending command";
+		const char warnstr[] = "error sending command";
 
 		if (retval < 0)
 			warn(warnstr);
@@ -4954,7 +4954,7 @@ smpmaninfo(struct cam_device *device, in
 
 	if (((retval = cam_send_ccb(device, ccb)) < 0)
 	 || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) {
-		const char *warnstr = "error sending command";
+		const char warnstr[] = "error sending command";
 
 		if (retval < 0)
 			warn(warnstr);
@@ -5351,7 +5351,7 @@ smpphylist(struct cam_device *device, in
 
 	if (((retval = cam_send_ccb(device, ccb)) < 0)
 	 || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) {
-		const char *warnstr = "error sending command";
+		const char warnstr[] = "error sending command";
 
 		if (retval < 0)
 			warn(warnstr);
@@ -5431,7 +5431,7 @@ smpphylist(struct cam_device *device, in
 		if (((retval = cam_send_ccb(device, ccb)) < 0)
 		 || (((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
 		  && (disresponse->function_result != SMP_FR_PHY_VACANT))) {
-			const char *warnstr = "error sending command";
+			const char warnstr[] = "error sending command";
 
 			if (retval < 0)
 				warn(warnstr);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112162235.pBGMZK2k029887>