Warning fixes for Sparc32, Sparc64, PPC

Fix warnings that would be caused by gcc flag -Wwrite-strings and
-Wmissing-prototypes. Also fix most PPC specific warnings.


git-svn-id: svn://coreboot.org/openbios/openbios-devel@288 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2008-12-14 12:54:23 +00:00
parent bb20ce577c
commit c5d270009e
17 changed files with 54 additions and 48 deletions

View File

@@ -53,7 +53,7 @@ unsigned long base_address;
/* include path handling */
typedef struct include_path include;
struct include_path {
char *path;
const char *path;
include *next;
};
@@ -137,7 +137,7 @@ static void relocation_table(unsigned char * dict_one, unsigned char *dict_two,
relocation_address=reloc_table;
}
static void write_dictionary(char *filename)
static void write_dictionary(const char *filename)
{
FILE *f;
unsigned char *write_data, *walk_data;
@@ -375,7 +375,7 @@ static void paddict(ucell align)
* generic forth word creator function.
*/
static void fcreate(char *word, ucell cfaval)
static void fcreate(const char *word, ucell cfaval)
{
if (strlen(word) == 0) {
printk("WARNING: tried to create unnamed word.\n");
@@ -395,20 +395,20 @@ static void fcreate(char *word, ucell cfaval)
}
static ucell *buildvariable(char *name, cell defval)
static ucell *buildvariable(const char *name, cell defval)
{
fcreate(name, DOVAR); /* see dict.h for DOVAR and other CFA ids */
writecell(defval);
return (ucell *) (dict + dicthead - sizeof(cell));
}
static void buildconstant(char *name, cell defval)
static void buildconstant(const char *name, cell defval)
{
fcreate(name, DOCON); /* see dict.h for DOCON and other CFA ids */
writecell(defval);
}
static void builddefer(char *name)
static void builddefer(const char *name)
{
fcreate(name, DODFR); /* see dict.h for DODFR and other CFA ids */
writecell((ucell)0);

View File

@@ -68,7 +68,7 @@ static int to_lower(int c)
/* fstrcmp - compare null terminated string with forth string. */
static int fstrcmp(char *s1, ucell fstr)
static int fstrcmp(const char *s1, ucell fstr)
{
char *s2 = (char*)cell2pointer(fstr);
while (*s1) {
@@ -84,7 +84,7 @@ static int fstrcmp(char *s1, ucell fstr)
* word.
*/
xt_t findword(char *s1)
xt_t findword(const char *s1)
{
ucell tmplfa, len;