Browse Source

[uri] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
dbb27c9c3b
1 changed files with 2 additions and 4 deletions
  1. 2
    4
      src/tests/uri_test.c

+ 2
- 4
src/tests/uri_test.c View File

34
 
34
 
35
 static int test_parse_unparse ( const char *uri_string ) {
35
 static int test_parse_unparse ( const char *uri_string ) {
36
 	char buf[URI_MAX_LEN];
36
 	char buf[URI_MAX_LEN];
37
-	size_t len;
38
 	struct uri *uri = NULL;
37
 	struct uri *uri = NULL;
39
 	int rc;
38
 	int rc;
40
 
39
 
44
 		rc = -ENOMEM;
43
 		rc = -ENOMEM;
45
 		goto done;
44
 		goto done;
46
 	}
45
 	}
47
-	len = unparse_uri ( buf, sizeof ( buf ), uri, URI_ALL );
46
+	unparse_uri ( buf, sizeof ( buf ), uri, URI_ALL );
48
 
47
 
49
 	/* Compare result */
48
 	/* Compare result */
50
 	if ( strcmp ( buf, uri_string ) != 0 ) {
49
 	if ( strcmp ( buf, uri_string ) != 0 ) {
72
 	struct uri *relative_uri = NULL;
71
 	struct uri *relative_uri = NULL;
73
 	struct uri *resolved_uri = NULL;
72
 	struct uri *resolved_uri = NULL;
74
 	char buf[URI_MAX_LEN];
73
 	char buf[URI_MAX_LEN];
75
-	size_t len;
76
 	int rc;
74
 	int rc;
77
 
75
 
78
 	/* Parse URIs */
76
 	/* Parse URIs */
95
 	}
93
 	}
96
 
94
 
97
 	/* Compare result */
95
 	/* Compare result */
98
-	len = unparse_uri ( buf, sizeof ( buf ), resolved_uri, URI_ALL );
96
+	unparse_uri ( buf, sizeof ( buf ), resolved_uri, URI_ALL );
99
 	if ( strcmp ( buf, resolved_uri_string ) != 0 ) {
97
 	if ( strcmp ( buf, resolved_uri_string ) != 0 ) {
100
 		printf ( "Resolution of \"%s\"+\"%s\" produced \"%s\"\n",
98
 		printf ( "Resolution of \"%s\"+\"%s\" produced \"%s\"\n",
101
 			 base_uri_string, relative_uri_string, buf );
99
 			 base_uri_string, relative_uri_string, buf );

Loading…
Cancel
Save