]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[uri] Avoid unused variable warning in gcc 4.6
authorMichael Brown <mcb30@ipxe.org>
Wed, 16 Mar 2011 20:21:08 +0000 (20:21 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 16 Mar 2011 20:21:08 +0000 (20:21 +0000)
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/tests/uri_test.c

index fd29d39700f3e5116dd5f5c52ec15b9d9c3ec079..c39c7ffed5c21763b85bafd21ab326d8218889e3 100644 (file)
@@ -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 );