Commit b5f5d105 authored by Tinggong's avatar Tinggong Committed by Rusty Russell

iscsi, ttxml: fix warning [-Wunused-but-set-variable]

hi all,

here is a trival path to fix warning [-Wunused-but-set-variable].

Thanks.
Tinggong
Signed-off-by: default avatarTinggong <wangtinggong@gmail.com>
parent 4a850584
...@@ -45,7 +45,6 @@ static void set_nonblocking(int fd) ...@@ -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 iscsi_connect_async(struct iscsi_context *iscsi, const char *target, iscsi_command_cb cb, void *private_data)
{ {
int tpgt = -1;
int port = 3260; int port = 3260;
char *str; char *str;
char *addr; char *addr;
...@@ -73,7 +72,6 @@ int iscsi_connect_async(struct iscsi_context *iscsi, const char *target, iscsi_c ...@@ -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 */ /* check if we have a target portal group tag */
if ((str = rindex(addr, ',')) != NULL) { if ((str = rindex(addr, ',')) != NULL) {
tpgt = atoi(str+1);
str[0] = 0; str[0] = 0;
} }
......
...@@ -278,7 +278,6 @@ xml_read_attr_malloc: ...@@ -278,7 +278,6 @@ xml_read_attr_malloc:
*/ */
static XmlNode* xml_parse(struct XMLBUF *xml) static XmlNode* xml_parse(struct XMLBUF *xml)
{ {
int offset;
int toff; int toff;
char **tmp; char **tmp;
char *stmp; char *stmp;
...@@ -287,7 +286,6 @@ static XmlNode* xml_parse(struct XMLBUF *xml) ...@@ -287,7 +286,6 @@ static XmlNode* xml_parse(struct XMLBUF *xml)
this = &ret; this = &ret;
xml_skip(xml, XML_SPACE); // skip whitespace xml_skip(xml, XML_SPACE); // skip whitespace
offset=0;
while( (xml->read_index < xml->len) || !xml->eof ) while( (xml->read_index < xml->len) || !xml->eof )
{ {
switch(is_special(xml_peek(xml))) switch(is_special(xml_peek(xml)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment