disk/ata.c: fix signedness weirdness in ata_id_c_string()
authorH. Peter Anvin <hpa@zytor.com>
Sun, 10 Jan 2010 21:13:56 +0000 (13:13 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Sun, 10 Jan 2010 21:13:56 +0000 (13:13 -0800)
Fix signedness weirdness in ata_id_c_string(), thus killing a warning.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
com32/gpllib/disk/ata.c

index b0c2b63..78f669e 100644 (file)
@@ -55,7 +55,7 @@ void ata_id_c_string(const uint16_t * id, unsigned char *s,
 
     ata_id_string(id, s, ofs, len - 1);
 
-    p = s + strnlen(s, len - 1);
+    p = s + strnlen((const char *)s, len - 1);
     while (p > s && p[-1] == ' ')
        p--;
     *p = '\0';