From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers: target: target_core_transport.c: build warning
Date: Tue, 9 Sep 2014 13:02:27 +0530 [thread overview]
Message-ID: <20140909073227.GB11332@sudip-PC> (raw)
In-Reply-To: <1410247430-11293-1-git-send-email-sudipm.mukherjee@gmail.com>
On Tue, Sep 09, 2014 at 12:53:50PM +0530, Sudip Mukherjee wrote:
> build is giving :
> warning: passing argument 1 of 'strlen' makes pointer from integer
> without a cast [enabled by default]
>
> the snprintf after the strlen is trying to put the "Unsupported" string
> at the end of exising string. so len should give the string length here
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
> drivers/target/target_core_transport.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
> index 1dd1181..3ce85ed 100644
> --- a/drivers/target/target_core_transport.c
> +++ b/drivers/target/target_core_transport.c
> @@ -953,7 +953,7 @@ int transport_dump_vpd_ident_type(
> strlcat(buf, "SCSI name string\n", sizeof(buf));
> break;
> default:
> - len = strlen(len);
> + len = strlen(buf);
> snprintf(&buf[len], sizeof(buf) - len, "Unsupported: 0x%02x\n",
> vpd->device_identifier_type);
> ret = -EINVAL;
> --
> 1.8.1.2
>
please discard this patch. This is based on next-20140908 , and the
issue has been corrected in next-20140909.
thanks
sudip
prev parent reply other threads:[~2014-09-09 7:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-09 7:23 Sudip Mukherjee
2014-09-09 7:32 ` Sudip Mukherjee [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140909073227.GB11332@sudip-PC \
--to=sudipm.mukherjee@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®