Clean up nasty dtc warnings
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@87 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
9c4c15c5ac
commit
b4a7dad494
8 changed files with 15 additions and 17 deletions
3
Makefile
3
Makefile
|
|
@ -48,7 +48,8 @@ CFLAGS := -Os -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
|
|||
-ffreestanding -fno-builtin
|
||||
|
||||
HOSTCC := gcc
|
||||
HOSTCFLAGS := -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
|
||||
HOSTCFLAGS := -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
|
||||
-Wno-unused -Wno-sign-compare -Wno-pointer-sign
|
||||
|
||||
LINUXBIOSINCLUDE := -I$(src) -Iinclude \
|
||||
-I$(src)/include \
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ $(obj)/lex.yy.c: $(src)/util/dtc/dtc-lexer.l
|
|||
$(obj)/dtc.o: $(src)/util/dtc/dtc.c
|
||||
$(Q)$(HOSTCC) $(HOSTCFLAGS) -o $@ -c $<
|
||||
$(obj)/livetree.o: $(src)/util/dtc/livetree.c
|
||||
$(Q)$(HOSTCC) $(HOSTCFLAGS) -o $@ -c $<
|
||||
$(HOSTCC) $(HOSTCFLAGS) -o $@ -c $<
|
||||
$(obj)/flattree.o: $(src)/util/dtc/flattree.c
|
||||
$(Q)$(HOSTCC) $(HOSTCFLAGS) -o $@ -c $<
|
||||
$(HOSTCC) $(HOSTCFLAGS) -o $@ -c $<
|
||||
$(obj)/data.o: $(src)/util/dtc/data.c
|
||||
$(Q)$(HOSTCC) $(HOSTCFLAGS) -o $@ -c $<
|
||||
$(obj)/treesource.o: $(src)/util/dtc/treesource.c
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ struct data data_copy_escape_string(char *s, int len)
|
|||
{
|
||||
int i = 0;
|
||||
struct data d;
|
||||
char *q;
|
||||
unsigned char *q;
|
||||
|
||||
d = data_grow_for(empty_data, strlen(s)+1);
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ char *code = 0;
|
|||
|
||||
<MEMRESERVE>[0-9a-fA-F]+ {
|
||||
yylloc.first_line = yylineno;
|
||||
if (yyleng > 2*sizeof(yylval.addr)) {
|
||||
if ((unsigned long)yyleng > 2*sizeof(yylval.addr)) {
|
||||
fprintf(stderr, "Address value %s too large\n",
|
||||
yytext);
|
||||
}
|
||||
|
|
@ -103,7 +103,7 @@ char *code = 0;
|
|||
|
||||
<CELLDATA>[0-9a-fA-F]+ {
|
||||
yylloc.first_line = yylineno;
|
||||
if (yyleng > 2*sizeof(yylval.cval)) {
|
||||
if ((unsigned long)yyleng > 2*sizeof(yylval.cval)) {
|
||||
fprintf(stderr,
|
||||
"Cell value %s too long\n", yytext);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,12 +105,12 @@ static void usage(void)
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct boot_info *bi;
|
||||
struct boot_info *bi=NULL;
|
||||
char *inform = "dts";
|
||||
char *outform = "dts";
|
||||
char *outname = "-";
|
||||
int force = 0;
|
||||
char *arg;
|
||||
char *arg=NULL;
|
||||
int opt;
|
||||
FILE *inf = NULL;
|
||||
FILE *outf = NULL;
|
||||
|
|
|
|||
|
|
@ -465,6 +465,7 @@ static void linuxbios_emit_endnode(void *e, char *label)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef LINUXBIOS_OUTPUT
|
||||
static void linuxbios_emit_struct_start(void *e, char *prefix, char *label)
|
||||
{
|
||||
FILE *f = e;
|
||||
|
|
@ -482,7 +483,7 @@ static void linuxbios_emit_struct_end(void *e, char *prefix, char *label)
|
|||
fprintf(f, "}; /*%s*/\n", label);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
static void linuxbios_emit_property(void *e, char *label)
|
||||
|
|
@ -1293,7 +1294,7 @@ static const char UNITCHAR[] = "0123456789abcdef,";
|
|||
static int check_node_name(char *name)
|
||||
{
|
||||
char *atpos;
|
||||
int basenamelen;
|
||||
unsigned int basenamelen;
|
||||
|
||||
atpos = strrchr(name, '@');
|
||||
|
||||
|
|
@ -1374,7 +1375,7 @@ static struct node *unflatten_tree(struct inbuf *dtbuf,
|
|||
|
||||
struct boot_info *dt_from_blob(FILE *f)
|
||||
{
|
||||
u32 magic, totalsize, version, size_str;
|
||||
u32 magic, totalsize, version, size_str = 0;
|
||||
u32 off_dt, off_str, off_mem_rsvmap;
|
||||
int rc;
|
||||
char *blob;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ enum proptype {
|
|||
static enum proptype guess_type(struct property *prop)
|
||||
{
|
||||
int len = prop->val.len;
|
||||
char *p = prop->val.val;
|
||||
unsigned char *p = prop->val.val;
|
||||
int nnoprint = 0;
|
||||
int i;
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ static void write_tree_source_node(FILE *f, struct node *tree, int level)
|
|||
|
||||
for_each_property(tree, prop) {
|
||||
cell_t *cp;
|
||||
char *bp;
|
||||
unsigned char *bp;
|
||||
void *propend;
|
||||
enum proptype type;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,10 +20,6 @@
|
|||
|
||||
SOURCE := lar.c create.c extract.c list.c lib.c
|
||||
|
||||
|
||||
HOSTCC=gcc
|
||||
HOSTCFLAGS=-O2 -Wall -W
|
||||
|
||||
$(obj)/util/lar/lar: $(patsubst %,$(src)/util/lar/%,$(SOURCE))
|
||||
$(Q)printf "Building LAR utility..."
|
||||
$(Q)mkdir -p $(obj)/util/lar
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue