From: Tom Rini Date: Wed, 7 Aug 2019 23:16:30 -0400 Subject: [U-Boot] [PATCH 2/2] cmd: avb: Fix compiler warnings In-Reply-To: <20190731165909.2371-2-semen.protsenko@linaro.org> References: <20190731165909.2371-1-semen.protsenko@linaro.org> <20190731165909.2371-2-semen.protsenko@linaro.org> Message-ID: <20190808031630.GC9594@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Jul 31, 2019 at 07:59:09PM +0300, Sam Protsenko wrote: > When building U-Boot with AVB enabled, compiler shows next warnings: > > cmd/avb.c: In function 'do_avb_read_pvalue': > cmd/avb.c:371:18: warning: format '%ld' expects argument of type > 'long int', but argument 2 has type 'size_t' > {aka 'unsigned int'} [-Wformat=] > printf("Read %ld bytes, value = %s\n", bytes_read, > ~~^ ~~~~~~~~~~ > %d > > cmd/avb.c: In function 'do_avb_write_pvalue': > cmd/avb.c:404:19: warning: format '%ld' expects argument of type > 'long int', but argument 2 has type '__kernel_size_t' > {aka 'unsigned int'} [-Wformat=] > printf("Wrote %ld bytes\n", strlen(value) + 1); > ~~^ ~~~~~~~~~~~~~~~~~ > %d > > Fix those by using "%zu" specified. > > Signed-off-by: Sam Protsenko > Reviewed-by: Igor Opaniuk Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: