[ccan] [PATCH] iscsi, ttxml: fix warning [-Wunused-but-set-variable]
Daniel Burke
dan.p.burke at gmail.com
Tue Mar 12 03:32:52 EST 2013
Ack. Thanks to Tinggong for the patch, and Rusty for the Syn.
regards,
dan
--
"The world is full of magical things patiently waiting for our wits to grow
sharper." - Bertrand Russell
On 11 March 2013 15:36, Rusty Russell <rusty at rustcorp.com.au> wrote:
> Tinggong <wangtinggong at gmail.com> writes:
>
> > hi all,
> >
> > here is a trival path to fix warning [-Wunused-but-set-variable].
> >
> > Thanks.
> > Tinggong
>
> I've CC'd Daniel Burke for an Ack on the ttxml patch...
>
> Thanks,
> Rusty.
>
> > Signed-off-by: Tinggong <wangtinggong at gmail.com>
> > ---
> > ccan/iscsi/socket.c | 2 --
> > ccan/ttxml/ttxml.c | 4 +---
> > 2 files changed, 1 insertion(+), 5 deletions(-)
> >
> > diff --git a/ccan/iscsi/socket.c b/ccan/iscsi/socket.c
> > index f79b316..430be72 100644
> > --- a/ccan/iscsi/socket.c
> > +++ b/ccan/iscsi/socket.c
> > @@ -45,7 +45,6 @@ static void set_nonblocking(int fd)
> >
> > int iscsi_connect_async(struct iscsi_context *iscsi, const char
> *target, iscsi_command_cb cb, void *private_data)
> > {
> > - int tpgt = -1;
> > int port = 3260;
> > char *str;
> > char *addr;
> > @@ -73,7 +72,6 @@ int iscsi_connect_async(struct iscsi_context *iscsi,
> const char *target, iscsi_c
> >
> > /* check if we have a target portal group tag */
> > if ((str = rindex(addr, ',')) != NULL) {
> > - tpgt = atoi(str+1);
> > str[0] = 0;
> > }
> >
> > diff --git a/ccan/ttxml/ttxml.c b/ccan/ttxml/ttxml.c
> > index ffda34b..410ac73 100644
> > --- a/ccan/ttxml/ttxml.c
> > +++ b/ccan/ttxml/ttxml.c
> > @@ -278,16 +278,14 @@ xml_read_attr_malloc:
> > */
> > static XmlNode* xml_parse(struct XMLBUF *xml)
> > {
> > - int offset;
> > int toff;
> > char **tmp;
> > char *stmp;
> > XmlNode **this, *ret = NULL;
> > -
> > +
> > this = &ret;
> >
> > xml_skip(xml, XML_SPACE); // skip whitespace
> > - offset=0;
> > while( (xml->read_index < xml->len) || !xml->eof )
> > {
> > switch(is_special(xml_peek(xml)))
> > --
> > 1.7.11.7
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20130312/046ead83/attachment.html>
More information about the ccan
mailing list