Browse Source

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: Tinggong <wangtinggong@gmail.com>
Tinggong 13 years ago
parent
commit
b5f5d105d1
2 changed files with 1 additions and 5 deletions
  1. 0 2
      ccan/iscsi/socket.c
  2. 1 3
      ccan/ttxml/ttxml.c

+ 0 - 2
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;
 	}
 

+ 1 - 3
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)))