mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
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:
@@ -342,9 +342,15 @@ next_dentry (xfs_ino_t *ino)
|
||||
{
|
||||
int namelen = 1;
|
||||
int toread;
|
||||
static char *usual[2] = {".", ".."};
|
||||
static char *usual[2];
|
||||
static xfs_dir2_sf_entry_t *sfe;
|
||||
char *name = usual[0];
|
||||
char *name;
|
||||
|
||||
if (!usual[0]) {
|
||||
usual[0] = strdup(".");
|
||||
usual[1] = strdup("..");
|
||||
}
|
||||
name = usual[0];
|
||||
|
||||
if (xfs.dirpos >= xfs.dirmax) {
|
||||
if (xfs.forw == 0)
|
||||
|
||||
@@ -47,7 +47,7 @@ void (*disk_read_func) (int, int, int);
|
||||
/************************************************************************/
|
||||
|
||||
typedef struct fsys_entry {
|
||||
char *name;
|
||||
const char *name;
|
||||
int (*mount_func) (void);
|
||||
int (*read_func) (char *buf, int len);
|
||||
int (*dir_func) (char *dirname);
|
||||
@@ -221,7 +221,7 @@ close_fs( fs_ops_t *fs )
|
||||
/* callers responsibility to call free(fs) */
|
||||
}
|
||||
|
||||
static char *
|
||||
static const char *
|
||||
grubfs_get_fstype( fs_ops_t *fs )
|
||||
{
|
||||
grubfs_t *gfs = (grubfs_t*)fs->fs_data;
|
||||
|
||||
@@ -67,7 +67,9 @@ search_files( record *par, int recursive, match_proc_t proc, const void *match_d
|
||||
} while( ret && !record_next(&r) );
|
||||
|
||||
if( !ret && pt ) {
|
||||
char name[256], *s2 = t.path ? t.path : "";
|
||||
char name[256];
|
||||
const char *s2 = t.path ? t.path : "";
|
||||
|
||||
unicode_uni2asc( name, &r.key.name, sizeof(name));
|
||||
|
||||
pt->rec = t.rec;
|
||||
@@ -359,7 +361,7 @@ vol_name( fs_ops_t *fs, char *buf, int size )
|
||||
return get_hfs_vol_name( fs->fd, buf, size );
|
||||
}
|
||||
|
||||
static char *
|
||||
static const char *
|
||||
get_fstype( fs_ops_t *fs )
|
||||
{
|
||||
return ("HFS+");
|
||||
|
||||
Reference in New Issue
Block a user