mirror of
				https://gitlab.com/qemu-project/openbios.git
				synced 2024-02-13 08:34:06 +08:00 
			
		
		
		
	all: gcc 9 build fixes
Fix up warnings generated by building with -Werror under gcc 9. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
This commit is contained in:
		| @ -115,7 +115,7 @@ struct context *switch_to(struct context *ctx) | |||||||
|     __context = ctx; |     __context = ctx; | ||||||
|     asm __volatile__ ("\n\tcall __switch_context" |     asm __volatile__ ("\n\tcall __switch_context" | ||||||
|                       "\n\tnop" ::: "g1", "g2", "g3", "g4", "g5", "g6", "g7", |                       "\n\tnop" ::: "g1", "g2", "g3", "g4", "g5", "g6", "g7", | ||||||
|                       "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7", |                       "o0", "o1", "o2", "o3", "o4", "o5", "o7", | ||||||
|                       "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", |                       "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", | ||||||
|                       "i0", "i1", "i2", "i3", "i4", "i5", "i7", |                       "i0", "i1", "i2", "i3", "i4", "i5", "i7", | ||||||
|                       "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", |                       "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", | ||||||
|  | |||||||
| @ -369,7 +369,7 @@ static void | |||||||
| rtc_init(char *path) | rtc_init(char *path) | ||||||
| { | { | ||||||
| 	phandle_t ph, aliases; | 	phandle_t ph, aliases; | ||||||
| 	char buf[64]; | 	char buf[128]; | ||||||
|  |  | ||||||
|         snprintf(buf, sizeof(buf), "%s/rtc", path); |         snprintf(buf, sizeof(buf), "%s/rtc", path); | ||||||
| 	REGISTER_NAMED_NODE(rtc, buf); | 	REGISTER_NAMED_NODE(rtc, buf); | ||||||
| @ -387,7 +387,7 @@ static void | |||||||
| powermgt_init(char *path) | powermgt_init(char *path) | ||||||
| { | { | ||||||
| 	phandle_t ph; | 	phandle_t ph; | ||||||
| 	char buf[64]; | 	char buf[128]; | ||||||
|  |  | ||||||
|         snprintf(buf, sizeof(buf), "%s/power-mgt", path); |         snprintf(buf, sizeof(buf), "%s/power-mgt", path); | ||||||
| 	REGISTER_NAMED_NODE(rtc, buf); | 	REGISTER_NAMED_NODE(rtc, buf); | ||||||
|  | |||||||
| @ -987,7 +987,7 @@ ob_ide_identify_drive(struct ide_drive *drive) | |||||||
| 		drive->sect = id.sectors; | 		drive->sect = id.sectors; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	strncpy(drive->model, (char*)id.model, sizeof(id.model)); | 	strncpy(drive->model, (char*)id.model, sizeof(drive->model)); | ||||||
| 	drive->model[40] = '\0'; | 	drive->model[40] = '\0'; | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
|  | |||||||
| @ -523,7 +523,7 @@ NODE_METHODS(rtc) = { | |||||||
| static void rtc_init(char *path) | static void rtc_init(char *path) | ||||||
| { | { | ||||||
|     phandle_t ph, aliases; |     phandle_t ph, aliases; | ||||||
|     char buf[64]; |     char buf[128]; | ||||||
|  |  | ||||||
|     snprintf(buf, sizeof(buf), "%s/rtc", path); |     snprintf(buf, sizeof(buf), "%s/rtc", path); | ||||||
|     REGISTER_NAMED_NODE(rtc, buf); |     REGISTER_NAMED_NODE(rtc, buf); | ||||||
| @ -540,7 +540,7 @@ static void rtc_init(char *path) | |||||||
| static void powermgt_init(char *path) | static void powermgt_init(char *path) | ||||||
| { | { | ||||||
|     phandle_t ph; |     phandle_t ph; | ||||||
|     char buf[64]; |     char buf[128]; | ||||||
|  |  | ||||||
|     /* This is a bunch of magic "Feature" bits for which we only have |     /* This is a bunch of magic "Feature" bits for which we only have | ||||||
|      * partial definitions from Darwin. These are taken from a |      * partial definitions from Darwin. These are taken from a | ||||||
|  | |||||||
| @ -86,7 +86,7 @@ _search( hfsvol *vol, const char *path, const char *sname, hfsfile **ret_fd ) | |||||||
|  |  | ||||||
| 	strncpy( buf, path, sizeof(buf) ); | 	strncpy( buf, path, sizeof(buf) ); | ||||||
| 	if( buf[strlen(buf)-1] != ':' ) | 	if( buf[strlen(buf)-1] != ':' ) | ||||||
| 		strncat( buf, ":", sizeof(buf) ); | 		strncat( buf, ":", sizeof(buf) - 1 ); | ||||||
| 	buf[sizeof(buf)-1] = 0; | 	buf[sizeof(buf)-1] = 0; | ||||||
| 	p = buf + strlen( buf ); | 	p = buf + strlen( buf ); | ||||||
|  |  | ||||||
|  | |||||||
| @ -105,7 +105,7 @@ create_free_part( char *ptr, int size ) | |||||||
| 	nvpart_t *nvp = (nvpart_t*)ptr; | 	nvpart_t *nvp = (nvpart_t*)ptr; | ||||||
| 	memset( nvp, 0, size ); | 	memset( nvp, 0, size ); | ||||||
|  |  | ||||||
| 	strncpy( nvp->name, "777777777777", sizeof(nvp->name) ); | 	strncpy( nvp->name, "77777777777", sizeof(nvp->name) ); | ||||||
| 	nvp->signature = NV_SIG_FREE; | 	nvp->signature = NV_SIG_FREE; | ||||||
| 	nvp->len_hi = (size /16) >> 8; | 	nvp->len_hi = (size /16) >> 8; | ||||||
| 	nvp->len_lo = size /16; | 	nvp->len_lo = size /16; | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Mark Cave-Ayland
					Mark Cave-Ayland