cosmetic fixes for gcc pointer sign warnings (trivial)

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@295 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Stefan Reinauer 2007-04-28 11:06:54 +00:00
commit f1bc5438c6
3 changed files with 12 additions and 12 deletions

View file

@ -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]))

View file

@ -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;
}

View file

@ -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;i<argc;i++) {
if(argv[i][0]!='-') {
@ -347,7 +347,7 @@ int main(int argc, char **argv)
/* put in the record type */
ce->tag=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));