[PATCH U-BOOT 00/26] fs: btrfs: Re-implement btrfs support using the more widely used extent buffer base code

Qu Wenruo quwenruo.btrfs at gmx.com
Wed Apr 22 10:12:26 CEST 2020



On 2020/4/22 下午3:59, Marek Behun wrote:
> Also there are some warnings when compiling for Mox and Omnia:
> 
> 
> 
> 
> fs/btrfs/inode.c: In function ‘btrfs_lookup_path’:
> fs/btrfs/inode.c:141:16: warning: ‘parent_root’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>   141 |   key.objectid = parent_root;
>       |   ~~~~~~~~~~~~~^~~~~~~~~~~~~
> fs/btrfs/inode.c:127:7: note: ‘parent_root’ was declared here
>   127 |   u64 parent_root;
>       |       ^~~~~~~~~~~
>   CC      cmd/nvedit.o
> In file included from fs/btrfs/ctree.h:19,
>                  from fs/btrfs/disk-io.h:7,
>                  from fs/btrfs/disk-io.c:8:
> fs/btrfs/disk-io.c: In function ‘btrfs_scan_fs_devices’:
> fs/btrfs/disk-io.c:881:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘lbaint_t’ {aka ‘long unsigned int’} [-Wformat=]
>   881 |   error("superblock end %u is larger than device size %llu",
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   882 |     BTRFS_SUPER_INFO_SIZE + BTRFS_SUPER_INFO_OFFSET,
>   883 |     part->size << desc->log2blksz);
>       |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |                |
>       |                lbaint_t {aka long unsigned int}
> fs/btrfs/compat.h:13:29: note: in definition of macro ‘error’
>    13 | #define error(...) { printf(__VA_ARGS__); printf("\n"); }
>       |                             ^~~~~~~~~~~
> fs/btrfs/disk-io.c:881:58: note: format string is defined here
>   881 |   error("superblock end %u is larger than device size %llu",
>       |                                                       ~~~^
>       |                                                          |
>       |                                                          long long unsigned int
>       |                                                       %lu
> 
> 
> 
> 
> 
> 
> In file included from fs/btrfs/ctree.h:19,
>                  from fs/btrfs/volumes.c:5:
> fs/btrfs/volumes.c: In function ‘btrfs_check_chunk_valid’:
> fs/btrfs/volumes.c:404:9: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘u32’ {aka ‘unsigned int’} [-Wformat=]
>   404 |   error("invalid chunk item size, have %u expect [%zu, %lu)",
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> fs/btrfs/compat.h:13:29: note: in definition of macro ‘error’
>    13 | #define error(...) { printf(__VA_ARGS__); printf("\n"); }
>       |                             ^~~~~~~~~~~
> fs/btrfs/volumes.c:404:58: note: format string is defined here
>   404 |   error("invalid chunk item size, have %u expect [%zu, %lu)",
>       |                                                        ~~^
>       |                                                          |
>       |                                                          long unsigned int
>       |                                                        %u
> 
I also hit those with GCC 9.2, but in GCC 9.3 they just disappear, so
I'm not sure whether they are bugs from GCC or something else...

Thanks,
Qu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200422/5cce0114/attachment.sig>


More information about the U-Boot mailing list