]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[base16] Fix comparison of signed and unsigned integers
authorMichael Brown <mcb30@ipxe.org>
Tue, 12 Nov 2013 22:16:24 +0000 (22:16 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 14 Nov 2013 12:35:43 +0000 (12:35 +0000)
gcc 4.7.1 fails to report this erroneous comparison unless assertions
are enabled.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/base16.c

index 2544bd7fbd7ce1566601bec6ac1788107aba90ad..bf9cc21bb24a815822acb298838d85fd9ba94b9f 100644 (file)
@@ -129,7 +129,7 @@ int base16_decode ( const char *encoded, uint8_t *raw ) {
 
        DBG ( "Base16-decoded \"%s\" to:\n", encoded );
        DBG_HDA ( 0, raw, len );
-       assert ( len <= base16_decoded_max_len ( encoded ) );
+       assert ( len <= ( int ) base16_decoded_max_len ( encoded ) );
 
        return len;
 }