]> git.dujemihanovic.xyz Git - u-boot.git/commit
cmd: avb: Fix compiler warnings
authorSam Protsenko <semen.protsenko@linaro.org>
Wed, 31 Jul 2019 16:59:09 +0000 (19:59 +0300)
committerTom Rini <trini@konsulko.com>
Wed, 7 Aug 2019 19:31:04 +0000 (15:31 -0400)
commit97f3c09706543205f7a2f6fa91e110946c302fcb
treef142d688c2c98c23de7505a3ad39387cfabc0d08
parentf254bd02a0754402feaed2e5ec5aba4c5f1512e1
cmd: avb: Fix compiler warnings

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 <semen.protsenko@linaro.org>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
cmd/avb.c