grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH]: Fix several warnings on sparc64.


From: Vesa Jääskeläinen
Subject: Re: [PATCH]: Fix several warnings on sparc64.
Date: Wed, 04 Mar 2009 13:56:08 +0200
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

David Miller wrote:
> Many of these warnings are for two reasons:
> 
> 1) grub_ssize_t is != 'int' on sparc64, and many pieces of code
>    try to pass an int pointer in for the final arg of several
>    ieee1275 "get property" functions which take a grub_ssize_t
>    pointer.
> 
> 2) The third arg to grub_ieee1275_get_integer_property is
>    "uint32_t *" but we try passing pointers to grub_ieee1275_ihandle_t
>    objects there, but those are of grub_ieee1275_cell_t type,
>    which is uint64_t on sparc64.
> 
> diff --git a/kern/ieee1275/cmain.c b/kern/ieee1275/cmain.c
> index b5e2ba6..847d9fd 100644
> --- a/kern/ieee1275/cmain.c
> +++ b/kern/ieee1275/cmain.c
> @@ -157,11 +157,15 @@ grub_ieee1275_find_options (void)
>  void
>  grub_ieee1275_init (void)
>  {
> +  uint32_t val;

Please use grub_uint32_t instead... (I know..)

This same applies to other instances of that same type too...

> diff --git a/term/ieee1275/ofconsole.c b/term/ieee1275/ofconsole.c
> index 70fda9a..c24a4c2 100644
> --- a/term/ieee1275/ofconsole.c
> +++ b/term/ieee1275/ofconsole.c
> @@ -341,12 +341,15 @@ static grub_err_t
>  grub_ofconsole_init_input (void)
>  {
>    grub_ssize_t actual;
> +  uint32_t val;
>  
> -  if (grub_ieee1275_get_integer_property (grub_ieee1275_chosen, "stdin", 
> &stdin_ihandle,
> +  if (grub_ieee1275_get_integer_property (grub_ieee1275_chosen, "stdin", 
> &val,
>                                         sizeof stdin_ihandle, &actual)
>        || actual != sizeof stdin_ihandle)
>      return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "Cannot find stdin");
>  
> +  stdin_ihandle = val;

Why stdin_ihandle is not in proper type ? Or was there some other reason
for this change?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]