Re: [PATCH] btrfs-progs: fix gcc8 default build warning caused by '-Wformat-truncation'

2018-11-15 Thread Qu Wenruo
On 2018/10/26 上午9:58, 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), "/dev/mapper/%s",

Re: [PATCH] btrfs-progs: fix gcc8 default build warning caused by '-Wformat-truncation'

2018-10-25 Thread Qu Wenruo
On 2018/10/26 上午9:58, 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), "/dev/mapper/%s",

[PATCH] btrfs-progs: fix gcc8 default build warning caused by '-Wformat-truncation'

2018-10-25 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);