Re: [PATCH] btrfs-progs: fix compile warning when using gcc8 to compile btrfs-progs

2018-10-24 Thread David Sterba
On Fri, Oct 12, 2018 at 03:41:53PM +0800, Su Yanjun wrote: > When using gcc8 to compile btrfs-progs, it complains as below: > > ctree.c: In function 'btrfs_search_slot_for_read': > ctree.c:1249:45: warning: passing argument 3 of 'btrfs_search_slot' > discards 'const' qualifier from pointer

Re: [PATCH] btrfs-progs: fix compile warning when using gcc8 to compile btrfs-progs

2018-10-24 Thread David Sterba
On Fri, Oct 12, 2018 at 09:36:37AM +0800, Su Yanjun wrote: > When using gcc8 compiles utils.c, it complains as below: > > utils.c:852:45: warning: '%s' directive output may be truncated writing > up to 4095 bytes into a region of size 4084 [-Wformat-truncation=] >snprintf(path, sizeof(path), "

[PATCH] btrfs-progs: fix compile warning when using gcc8 to compile btrfs-progs

2018-10-12 Thread Su Yanjun
When using gcc8 to compile btrfs-progs, it complains as below: ctree.c: In function 'btrfs_search_slot_for_read': ctree.c:1249:45: warning: passing argument 3 of 'btrfs_search_slot' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] ret = btrfs_se

[PATCH] btrfs-progs: fix compile warning when using gcc8 to compile btrfs-progs

2018-10-11 Thread Su Yanjun
When using gcc8 compiles utils.c, it complains as below: utils.c:852:45: warning: '%s' directive output may be truncated writing up to 4095 bytes into a region of size 4084 [-Wformat-truncation=] snprintf(path, sizeof(path), "/dev/mapper/%s", name);