Merge pull request #15733 from benjarobin/fix_warn_ndebug

Allow to build without any warning with NDEBUG defined + Bugfix
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2020-05-07 09:47:19 +02:00
committed by GitHub
12 changed files with 26 additions and 37 deletions
+1 -3
View File
@@ -15,7 +15,6 @@
int resize_fs(int fd, uint64_t sz, uint64_t *ret_size) {
struct statfs sfs;
int r;
assert(fd >= 0);
@@ -54,8 +53,7 @@ int resize_fs(int fd, uint64_t sz, uint64_t *ret_size) {
sz -= sz % sfs.f_bsize;
r = snprintf(args.name, sizeof(args.name), "%" PRIu64, sz);
assert((size_t) r < sizeof(args.name));
xsprintf(args.name, "%" PRIu64, sz);
if (ioctl(fd, BTRFS_IOC_RESIZE, &args) < 0)
return -errno;