[OpenBIOS] [commit] r759 - in trunk/fcode-utils-devel: detok romheaders toke

repository service svn at openbios.org
Mon Apr 26 19:01:02 CEST 2010


Author: stepan
Date: Mon Apr 26 19:01:01 2010
New Revision: 759
URL: http://tracker.coreboot.org/trac/openbios/changeset/759

Log:
warning free build on OS X 10.5.8

Modified:
   trunk/fcode-utils-devel/detok/Makefile
   trunk/fcode-utils-devel/detok/addfcodes.c
   trunk/fcode-utils-devel/detok/decode.c
   trunk/fcode-utils-devel/detok/pcihdr.c
   trunk/fcode-utils-devel/detok/stream.c
   trunk/fcode-utils-devel/romheaders/Makefile
   trunk/fcode-utils-devel/toke/Makefile

Modified: trunk/fcode-utils-devel/detok/Makefile
==============================================================================
--- trunk/fcode-utils-devel/detok/Makefile	Mon Apr 26 17:57:21 2010	(r758)
+++ trunk/fcode-utils-devel/detok/Makefile	Mon Apr 26 19:01:01 2010	(r759)
@@ -29,7 +29,7 @@
 INCLUDES = -I../shared
 
 # Normal Flags:
-CFLAGS  = -O2 -Wall -Wextra
+CFLAGS  = -O2 -Wall -ansi #-Wextra
 LDFLAGS = 
 
 # Coverage:

Modified: trunk/fcode-utils-devel/detok/addfcodes.c
==============================================================================
--- trunk/fcode-utils-devel/detok/addfcodes.c	Mon Apr 26 17:57:21 2010	(r758)
+++ trunk/fcode-utils-devel/detok/addfcodes.c	Mon Apr 26 19:01:01 2010	(r759)
@@ -98,9 +98,9 @@
  **************************************************************************** */
 
 static char *current_vfc_line;
-static char *vfc_remainder;
+static u8 *vfc_remainder;
 static int vfc_line_no = 0;
-static char *vfc_buf_end;
+static u8 *vfc_buf_end;
 
 /*  Special Functions List  */
 /*  Initial fcode-field value of  -1  guarantees they won't be used  */
@@ -173,12 +173,12 @@
 {
 	bool retval = FALSE;	/*  TRUE = not at end yet  */
 	while (vfc_remainder < vfc_buf_end) {
-		current_vfc_line = vfc_remainder;
-		vfc_remainder = strchr(current_vfc_line, '\n');
+		current_vfc_line = (char *)vfc_remainder;
+		vfc_remainder = (u8 *)strchr((const char *)current_vfc_line, '\n');
 		*vfc_remainder = 0;
 		vfc_remainder++;
 		vfc_line_no++;
-		skip_whitespace(&current_vfc_line);
+		skip_whitespace((char **)&current_vfc_line);
 		if (*current_vfc_line == 0)
 			continue;	/*  Blank line */
 		if (*current_vfc_line == '#')

Modified: trunk/fcode-utils-devel/detok/decode.c
==============================================================================
--- trunk/fcode-utils-devel/detok/decode.c	Mon Apr 26 17:57:21 2010	(r758)
+++ trunk/fcode-utils-devel/detok/decode.c	Mon Apr 26 19:01:01 2010	(r759)
@@ -357,7 +357,7 @@
 {
 	u16 token;
 	u8 len;
-	u8 *string;
+	char *string;
 
 	output_token();
 	/* get forth string ( [len] [char0] ... [charn] ) */

Modified: trunk/fcode-utils-devel/detok/pcihdr.c
==============================================================================
--- trunk/fcode-utils-devel/detok/pcihdr.c	Mon Apr 26 17:57:21 2010	(r758)
+++ trunk/fcode-utils-devel/detok/pcihdr.c	Mon Apr 26 19:01:01 2010	(r759)
@@ -461,7 +461,7 @@
 	} else {
 		sprintf(temp_buf, "PCI Image padding-field of %d bytes "
 			"had first non-zero byte at offset %ld",
-			filler_len, scan_ptr - filler_ptr);
+			filler_len, (unsigned long)(scan_ptr - filler_ptr));
 	}
 	printremark(temp_buf);
 }

Modified: trunk/fcode-utils-devel/detok/stream.c
==============================================================================
--- trunk/fcode-utils-devel/detok/stream.c	Mon Apr 26 17:57:21 2010	(r758)
+++ trunk/fcode-utils-devel/detok/stream.c	Mon Apr 26 19:01:01 2010	(r759)
@@ -236,7 +236,7 @@
 		throw_eof(TRUE);
 	}
 	pc += nbytes;
-	return (retval);
+	return retval;
 }
 
 
@@ -252,7 +252,7 @@
 {
 	bool retval;
 	retval = INVERSE(pc == max);
-	return (retval);
+	return retval;
 }
 
 
@@ -282,7 +282,7 @@
 		tok |= *(get_bytes(1));
 	}
 	fcode = tok;
-	return (tok);
+	return tok;
 }
 
 u32 get_num32(void)
@@ -293,7 +293,7 @@
 	num_str = get_bytes(4);
 	retval = BIG_ENDIAN_LONG_FETCH(num_str);
 
-	return (retval);
+	return retval;
 }
 
 u16 get_num16(void)
@@ -304,7 +304,7 @@
 	num_str = get_bytes(2);
 	retval = BIG_ENDIAN_WORD_FETCH(num_str);
 
-	return (retval);
+	return retval;
 }
 
 u8 get_num8(void)
@@ -326,7 +326,7 @@
 		retval |= (retval & 0x80) ? 0xff00 : 0;
 	}
 
-	return (retval);
+	return retval;
 }
 
 /* **************************************************************************
@@ -356,12 +356,12 @@
 
 u8 *get_string(u8 * len)
 {
-	char *retval;
+	u8 *retval;
 
 	*len = get_num8();
 	retval = get_bytes((int) *len);
 
-	return (retval);
+	return retval;
 }
 
 
@@ -405,7 +405,7 @@
 	char *retval;
 	u8 sav_byt;
 
-	str_start = get_string(len);
+	str_start = (char *)get_string(len);
 
 	sav_byt = *pc;
 	*pc = 0;
@@ -413,7 +413,7 @@
 	retval = strdup(str_start);
 	*pc = sav_byt;
 
-	return (retval);
+	return retval;
 }
 
 /* **************************************************************************
@@ -462,7 +462,7 @@
 	}
 
 	pc = save_pc;
-	return (retval);
+	return retval;
 }
 
 

Modified: trunk/fcode-utils-devel/romheaders/Makefile
==============================================================================
--- trunk/fcode-utils-devel/romheaders/Makefile	Mon Apr 26 17:57:21 2010	(r758)
+++ trunk/fcode-utils-devel/romheaders/Makefile	Mon Apr 26 19:01:01 2010	(r759)
@@ -24,7 +24,7 @@
 
 CC	 ?= gcc
 STRIP    = strip
-CFLAGS   = -O2 -Wall -W -ansi
+CFLAGS   = -O2 -Wall -Wextra -ansi
 INCLUDES = -I../shared
 
 SOURCES = romheaders.c ../shared/classcodes.c

Modified: trunk/fcode-utils-devel/toke/Makefile
==============================================================================
--- trunk/fcode-utils-devel/toke/Makefile	Mon Apr 26 17:57:21 2010	(r758)
+++ trunk/fcode-utils-devel/toke/Makefile	Mon Apr 26 19:01:01 2010	(r759)
@@ -29,7 +29,7 @@
 INCLUDES = -I../shared
 
 # Normal flags
-CFLAGS  = -O2 -Wall -Wextra 
+CFLAGS  = -O2 -Wall -ansi -Wno-pointer-sign #-Wextra 
 LDFLAGS =
 
 # Coverage:



More information about the OpenBIOS mailing list