mirror_zfs/cmd
Ryan Moeller 73d7820bba Use signed types to prevent subtraction overflow
The difference between the sizes could be positive or negative. Leaving
the types as unsigned means the result overflows when the difference is
negative and removing the labs() means we'll have introduced a bug. The
subtraction results in the correct value when the unsigned integer is
interpreted as a signed integer by labs().

Clang doesn't see that we're doing a subtraction and abusing the types.
It sees the result of the subtraction, an unsigned value, being passed
to an absolute value function and emits a warning which we treat as an
error.

Reviewed by: Youzhong Yang <youzhong@gmail.com>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
Closes #9355
2019-09-22 15:27:53 -07:00
..
arc_summary Canonicalize Python shebangs 2019-09-12 13:32:32 -07:00
arcstat Canonicalize Python shebangs 2019-09-12 13:32:32 -07:00
dbufstat Canonicalize Python shebangs 2019-09-12 13:32:32 -07:00
fsck_zfs Fix typos in cmd/ 2019-08-30 09:43:30 -07:00
mount_zfs Refactor libzfs_error_init newlines 2019-09-18 09:05:57 -07:00
raidz_test Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
vdev_id Fix typos in cmd/ 2019-08-30 09:43:30 -07:00
zdb Fix typos in cmd/ 2019-08-30 09:43:30 -07:00
zed Fix typos in cmd/ 2019-08-30 09:43:30 -07:00
zfs Refactor libzfs_error_init newlines 2019-09-18 09:05:57 -07:00
zgenhostid Add zgenhostid utility script 2017-07-25 13:22:03 -04:00
zhack Add libzutil for libzfs or libzpool consumers 2018-11-05 11:22:33 -08:00
zinject Refactor libzfs_error_init newlines 2019-09-18 09:05:57 -07:00
zpool Use signed types to prevent subtraction overflow 2019-09-22 15:27:53 -07:00
zstreamdump Fix typos in cmd/ 2019-08-30 09:43:30 -07:00
ztest Fix typos in cmd/ 2019-08-30 09:43:30 -07:00
zvol_id Fedora 28: Fix misc bounds check compiler warnings 2018-04-04 10:16:47 -07:00
zvol_wait zvol_wait script should ignore partially received zvols 2019-09-03 11:29:52 -07:00
Makefile.am New service that waits on zvol links to be created 2019-07-17 15:33:05 -07:00