瀏覽代碼

[base16] Fix comparison of signed and unsigned integers

gcc 4.7.1 fails to report this erroneous comparison unless assertions
are enabled.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 11 年之前
父節點
當前提交
4f078801e9
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      src/core/base16.c

+ 1
- 1
src/core/base16.c 查看文件

@@ -129,7 +129,7 @@ int base16_decode ( const char *encoded, uint8_t *raw ) {
129 129
 
130 130
 	DBG ( "Base16-decoded \"%s\" to:\n", encoded );
131 131
 	DBG_HDA ( 0, raw, len );
132
-	assert ( len <= base16_decoded_max_len ( encoded ) );
132
+	assert ( len <= ( int ) base16_decoded_max_len ( encoded ) );
133 133
 
134 134
 	return len;
135 135
 }

Loading…
取消
儲存