mirror of
https://github.com/ipxe/ipxe
synced 2025-12-17 01:52:08 +03:00
[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>
This commit is contained in:
@@ -34,7 +34,6 @@ static struct uri_test uri_tests[] = {
|
||||
|
||||
static int test_parse_unparse ( const char *uri_string ) {
|
||||
char buf[URI_MAX_LEN];
|
||||
size_t len;
|
||||
struct uri *uri = NULL;
|
||||
int rc;
|
||||
|
||||
@@ -44,7 +43,7 @@ static int test_parse_unparse ( const char *uri_string ) {
|
||||
rc = -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
len = unparse_uri ( buf, sizeof ( buf ), uri, URI_ALL );
|
||||
unparse_uri ( buf, sizeof ( buf ), uri, URI_ALL );
|
||||
|
||||
/* Compare result */
|
||||
if ( strcmp ( buf, uri_string ) != 0 ) {
|
||||
@@ -72,7 +71,6 @@ static int test_resolve ( const char *base_uri_string,
|
||||
struct uri *relative_uri = NULL;
|
||||
struct uri *resolved_uri = NULL;
|
||||
char buf[URI_MAX_LEN];
|
||||
size_t len;
|
||||
int rc;
|
||||
|
||||
/* Parse URIs */
|
||||
@@ -95,7 +93,7 @@ static int test_resolve ( const char *base_uri_string,
|
||||
}
|
||||
|
||||
/* Compare result */
|
||||
len = unparse_uri ( buf, sizeof ( buf ), resolved_uri, URI_ALL );
|
||||
unparse_uri ( buf, sizeof ( buf ), resolved_uri, URI_ALL );
|
||||
if ( strcmp ( buf, resolved_uri_string ) != 0 ) {
|
||||
printf ( "Resolution of \"%s\"+\"%s\" produced \"%s\"\n",
|
||||
base_uri_string, relative_uri_string, buf );
|
||||
|
||||
Reference in New Issue
Block a user