[Skiboot] [PATCH] pflash: Fix compilation warning

Michael Neuling mikey at neuling.org
Fri Aug 5 10:55:26 AEST 2016


Oops, Thanks!

Stewart, could we add a top level make target that builds these extra tools
so we can more easily know when we break them.  make and make check don't
hit this.

Maybe 'make check' should.

Mikey


On Thu, 2016-08-04 at 13:46 +0530, Vasant Hegde wrote:
> pflash.c: In function 'main':
> pflash.c:781:8: warning: passing argument 3 of 'blocklevel_get_info' from
> incompatible pointer type
> ./libflash/blocklevel.h:64:5: note: expected 'uint64_t *' but argument is
> of type 'uint32_t *'
> 
> Fixes : c043065c (flash: Make size 64 bit safe)
> CC: Michael Neuling <mikey at neuling.org>
> CC: Cyril Bur <cyrilbur at gmail.com>
> 
> Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
> ---
>  external/pflash/pflash.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/external/pflash/pflash.c b/external/pflash/pflash.c
> index 2700046..2e978ca 100644
> --- a/external/pflash/pflash.c
> +++ b/external/pflash/pflash.c
> @@ -778,7 +778,7 @@ int main(int argc, char *argv[])
>  	atexit(exiting);
>  
>  	rc = blocklevel_get_info(bl, &fl_name,
> -			    &fl_total_size, &fl_erase_granule);
> +			    (uint64_t *)&fl_total_size,
> &fl_erase_granule);
>  	if (rc) {
>  		fprintf(stderr, "Error %d getting flash info\n", rc);
>  		exit(1);


More information about the Skiboot mailing list