[OpenBIOS] [PATCH] openbios: compile fixes for GCC 7.3

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Thu May 3 22:47:20 CEST 2018


On 21/04/18 17:01, Mark Cave-Ayland wrote:

> This fixes additional warnings found when upgrading my compiler toolset from
> GCC 5.x to 7.x.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
> ---
>   fs/hfs/hfs_fs.c            | 2 +-
>   libopenbios/video_common.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/hfs/hfs_fs.c b/fs/hfs/hfs_fs.c
> index 2d62ec0..2e63dbf 100644
> --- a/fs/hfs/hfs_fs.c
> +++ b/fs/hfs/hfs_fs.c
> @@ -101,7 +101,7 @@ _search( hfsvol *vol, const char *path, const char *sname, hfsfile **ret_fd )
>   		*p = 0;
>   		topdir = 0;
>   
> -		strncat( buf, ent.name, sizeof(buf) );
> +		strncat( buf, ent.name, sizeof(buf) - 1);
>   		if( (status=_search(vol, buf, sname, ret_fd)) != 2 )
>   			continue;
>   		topdir = 1;
> diff --git a/libopenbios/video_common.c b/libopenbios/video_common.c
> index 9bbc18c..7496446 100644
> --- a/libopenbios/video_common.c
> +++ b/libopenbios/video_common.c
> @@ -191,7 +191,7 @@ void setup_video()
>   	   values in the Forth dictionary. Hence everything is always in
>   	   sync. */
>   	phandle_t options;
> -	char buf[6];
> +	char buf[10];
>   
>   	feval("['] display-ih cell+");
>   	video.ih = cell2pointer(POP());

Applied to master.


ATB,

Mark.



More information about the OpenBIOS mailing list