diff --git a/util/dtc/dtc.h b/util/dtc/dtc.h index 43aad55297..e1142cd4eb 100644 --- a/util/dtc/dtc.h +++ b/util/dtc/dtc.h @@ -86,8 +86,8 @@ typedef u32 cell_t; #define be64_to_cpu(x) bswap_64(x) #endif -#define streq(a, b) (strcmp((a), (b)) == 0) -#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0) +#define streq(a, b) (strcmp((char *)(a), (char *)(b)) == 0) +#define strneq(a, b, n) (strncmp((char *)(a), (char *)(b), (n)) == 0) #define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1)) #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) diff --git a/util/dtc/flattree.c b/util/dtc/flattree.c index fe214aafe0..f28a5168f6 100644 --- a/util/dtc/flattree.c +++ b/util/dtc/flattree.c @@ -532,22 +532,22 @@ static void linuxbios_emit_special(FILE *e, struct node *tree) } if (streq(prop->name, "ops")){ - fprintf(f, "\t.ops = &%s,\n", clean(prop->val.val, 0)); + fprintf(f, "\t.ops = &%s,\n", clean((char *)prop->val.val, 0)); ops_set = 1; } if (streq(prop->name, "ops_pci")){ - fprintf(f, "\t.ops_pci = &%s,\n", clean(prop->val.val, 0)); + fprintf(f, "\t.ops_pci = &%s,\n", clean((char *)prop->val.val, 0)); ops_set = 1; } if (streq(prop->name, "ops_pci_bus")){ - fprintf(f, "\t.ops_pci_bus = &%s,\n", clean(prop->val.val, 0)); + fprintf(f, "\t.ops_pci_bus = &%s,\n", clean((char *)prop->val.val, 0)); ops_set = 1; } if (streq(prop->name, "ops_smbus_bus")){ - fprintf(f, "\t.ops_smbus_bus = &%s,\n", clean(prop->val.val, 0)); + fprintf(f, "\t.ops_smbus_bus = &%s,\n", clean((char *)prop->val.val, 0)); ops_set = 1; } } @@ -895,7 +895,7 @@ static void dump_stringtable_asm(FILE *f, struct data strbuf) p = strbuf.val; while (p < (strbuf.val + strbuf.len)) { - len = strlen(p); + len = strlen((char *)p); fprintf(f, "\t.string \"%s\"\n", p); p += len+1; } @@ -996,7 +996,7 @@ static void dump_stringtable_C(FILE *f, struct data strbuf) fprintf(f, "\tchar *stringtable[] = {\n"); while (p < (strbuf.val + strbuf.len)) { - len = strlen(p); + len = strlen((char *)p); fprintf(f, "\t\"%s\"\n", p); p += len+1; } diff --git a/util/options/build_opt_tbl.c b/util/options/build_opt_tbl.c index b5dd2b931d..ee48cba108 100644 --- a/util/options/build_opt_tbl.c +++ b/util/options/build_opt_tbl.c @@ -183,7 +183,7 @@ static int is_ident_nondigit(int c) return result; } -static int is_ident(char *str) +static int is_ident(unsigned char *str) { int result; int ch; @@ -223,7 +223,7 @@ int main(int argc, char **argv) struct cmos_entries *ce; struct cmos_enums *c_enums, *c_enums_start; struct cmos_checksum *cs; - unsigned char line[INPUT_LINE_MAX]; + char line[INPUT_LINE_MAX]; unsigned char uc; int entry_mode=0; int enum_mode=0; @@ -235,7 +235,7 @@ int main(int argc, char **argv) int entries_length; int enum_length; int len; - unsigned char buf[16]; + char buf[16]; for(i=1;itag=LB_TAG_OPTION; /* calculate and save the record length */ - len=strlen(ce->name)+1; + len=strlen((char *)ce->name)+1; /* make the record int aligned */ if(len%4) len+=(4-(len%4));