[CRIU] [PATCH] page-pipe: Update format for PAGE_SIZE

Pavel Emelyanov xemul at parallels.com
Fri Feb 21 05:18:31 PST 2014


On 02/21/2014 05:15 PM, Cyrill Gorcunov wrote:
>  | page-pipe.c:230:4: error: format ‘%zu’ expects argument of type ‘size_t’, but argument 4 has type ‘long unsigned int’ [-Werror=format]
>  | page-pipe.c:237:3: error: format ‘%zu’ expects argument of type ‘size_t’, but argument 4 has type ‘long unsigned int’ [-Werror=format]
> 
> This is because PAGE_SIZE is defined as unsigned long (same
> as kernel does).

Did you check this on PI?

> Reported-by: Pavel Emelyanov <xemul at parallels.com>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  page-pipe.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/page-pipe.c b/page-pipe.c
> index 028da64c4a48..e685ef9fd22f 100644
> --- a/page-pipe.c
> +++ b/page-pipe.c
> @@ -227,13 +227,13 @@ void debug_show_page_pipe(struct page_pipe *pp)
>  				ppb->pages_in, ppb->nr_segs);
>  		for (i = 0; i < ppb->nr_segs; i++) {
>  			iov = &ppb->iov[i];
> -			pr_debug("\t\t%p %zu\n", iov->iov_base, iov->iov_len / PAGE_SIZE);
> +			pr_debug("\t\t%p %lu\n", iov->iov_base, iov->iov_len / PAGE_SIZE);
>  		}
>  	}
>  
>  	pr_debug("* %u holes:\n", pp->free_hole);
>  	for (i = 0; i < pp->free_hole; i++) {
>  		iov = &pp->holes[i];
> -		pr_debug("\t%p %zu\n", iov->iov_base, iov->iov_len / PAGE_SIZE);
> +		pr_debug("\t%p %lu\n", iov->iov_base, iov->iov_len / PAGE_SIZE);
>  	}
>  }
> 




More information about the CRIU mailing list