Skip to content

Commit 9b6a8a4

Browse files
author
Stefan Reinauer
committed
warning free build on OS X 10.5.8
git-svn-id: svn://coreboot.org/openbios/trunk/fcode-utils-devel@759 f158a5a8-5612-0410-a976-696ce0be7e32
1 parent 76f2e7b commit 9b6a8a4

7 files changed

Lines changed: 21 additions & 21 deletions

File tree

detok/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ STRIP = strip
2929
INCLUDES = -I../shared
3030

3131
# Normal Flags:
32-
CFLAGS = -O2 -Wall -Wextra
32+
CFLAGS = -O2 -Wall -ansi #-Wextra
3333
LDFLAGS =
3434

3535
# Coverage:

detok/addfcodes.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@
9898
**************************************************************************** */
9999

100100
static char *current_vfc_line;
101-
static char *vfc_remainder;
101+
static u8 *vfc_remainder;
102102
static int vfc_line_no = 0;
103-
static char *vfc_buf_end;
103+
static u8 *vfc_buf_end;
104104

105105
/* Special Functions List */
106106
/* Initial fcode-field value of -1 guarantees they won't be used */
@@ -173,12 +173,12 @@ static bool get_next_vfc_line(void)
173173
{
174174
bool retval = FALSE; /* TRUE = not at end yet */
175175
while (vfc_remainder < vfc_buf_end) {
176-
current_vfc_line = vfc_remainder;
177-
vfc_remainder = strchr(current_vfc_line, '\n');
176+
current_vfc_line = (char *)vfc_remainder;
177+
vfc_remainder = (u8 *)strchr((const char *)current_vfc_line, '\n');
178178
*vfc_remainder = 0;
179179
vfc_remainder++;
180180
vfc_line_no++;
181-
skip_whitespace(&current_vfc_line);
181+
skip_whitespace((char **)&current_vfc_line);
182182
if (*current_vfc_line == 0)
183183
continue; /* Blank line */
184184
if (*current_vfc_line == '#')

detok/decode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ static void named_token(void)
357357
{
358358
u16 token;
359359
u8 len;
360-
u8 *string;
360+
char *string;
361361

362362
output_token();
363363
/* get forth string ( [len] [char0] ... [charn] ) */

detok/pcihdr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ void handle_pci_filler(u8 * filler_ptr)
461461
} else {
462462
sprintf(temp_buf, "PCI Image padding-field of %d bytes "
463463
"had first non-zero byte at offset %ld",
464-
filler_len, scan_ptr - filler_ptr);
464+
filler_len, (unsigned long)(scan_ptr - filler_ptr));
465465
}
466466
printremark(temp_buf);
467467
}

detok/stream.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static u8 *get_bytes(int nbytes)
236236
throw_eof(TRUE);
237237
}
238238
pc += nbytes;
239-
return (retval);
239+
return retval;
240240
}
241241

242242

@@ -252,7 +252,7 @@ bool more_to_go(void)
252252
{
253253
bool retval;
254254
retval = INVERSE(pc == max);
255-
return (retval);
255+
return retval;
256256
}
257257

258258

@@ -282,7 +282,7 @@ u16 next_token(void)
282282
tok |= *(get_bytes(1));
283283
}
284284
fcode = tok;
285-
return (tok);
285+
return tok;
286286
}
287287

288288
u32 get_num32(void)
@@ -293,7 +293,7 @@ u32 get_num32(void)
293293
num_str = get_bytes(4);
294294
retval = BIG_ENDIAN_LONG_FETCH(num_str);
295295

296-
return (retval);
296+
return retval;
297297
}
298298

299299
u16 get_num16(void)
@@ -304,7 +304,7 @@ u16 get_num16(void)
304304
num_str = get_bytes(2);
305305
retval = BIG_ENDIAN_WORD_FETCH(num_str);
306306

307-
return (retval);
307+
return retval;
308308
}
309309

310310
u8 get_num8(void)
@@ -326,7 +326,7 @@ s16 get_offset(void)
326326
retval |= (retval & 0x80) ? 0xff00 : 0;
327327
}
328328

329-
return (retval);
329+
return retval;
330330
}
331331

332332
/* **************************************************************************
@@ -356,12 +356,12 @@ s16 get_offset(void)
356356

357357
u8 *get_string(u8 * len)
358358
{
359-
char *retval;
359+
u8 *retval;
360360

361361
*len = get_num8();
362362
retval = get_bytes((int) *len);
363363

364-
return (retval);
364+
return retval;
365365
}
366366

367367

@@ -405,15 +405,15 @@ char *get_name(u8 * len)
405405
char *retval;
406406
u8 sav_byt;
407407

408-
str_start = get_string(len);
408+
str_start = (char *)get_string(len);
409409

410410
sav_byt = *pc;
411411
*pc = 0;
412412

413413
retval = strdup(str_start);
414414
*pc = sav_byt;
415415

416-
return (retval);
416+
return retval;
417417
}
418418

419419
/* **************************************************************************
@@ -462,7 +462,7 @@ u16 calc_checksum(void)
462462
}
463463

464464
pc = save_pc;
465-
return (retval);
465+
return retval;
466466
}
467467

468468

romheaders/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
CC ?= gcc
2626
STRIP = strip
27-
CFLAGS = -O2 -Wall -W -ansi
27+
CFLAGS = -O2 -Wall -Wextra -ansi
2828
INCLUDES = -I../shared
2929

3030
SOURCES = romheaders.c ../shared/classcodes.c

toke/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ STRIP = strip
2929
INCLUDES = -I../shared
3030

3131
# Normal flags
32-
CFLAGS = -O2 -Wall -Wextra
32+
CFLAGS = -O2 -Wall -ansi -Wno-pointer-sign #-Wextra
3333
LDFLAGS =
3434

3535
# Coverage:

0 commit comments

Comments
 (0)