zfs/cmd
Ryan Moeller 8498a2f3f8 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
2020-01-22 13:49:01 -08:00
..
arc_summary Canonicalize Python shebangs 2020-01-22 13:49:00 -08:00
arcstat Canonicalize Python shebangs 2020-01-22 13:49:00 -08:00
dbufstat Canonicalize Python shebangs 2020-01-22 13:49:00 -08:00
fsck_zfs Fix typos in cmd/ 2020-01-22 13:48:58 -08:00
mount_zfs Refactor libzfs_error_init newlines 2020-01-22 13:49:01 -08:00
raidz_test Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
vdev_id Fix typos in cmd/ 2020-01-22 13:48:58 -08:00
zdb Fix typos in cmd/ 2020-01-22 13:48:58 -08:00
zed Fix typos in cmd/ 2020-01-22 13:48:58 -08:00
zfs Refactor libzfs_error_init newlines 2020-01-22 13:49:01 -08: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 2020-01-22 13:49:01 -08:00
zpool Use signed types to prevent subtraction overflow 2020-01-22 13:49:01 -08:00
zstreamdump Fix typos in cmd/ 2020-01-22 13:48:58 -08:00
ztest Fix typos in cmd/ 2020-01-22 13:48:58 -08: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-25 11:27:51 -07:00
Makefile.am New service that waits on zvol links to be created 2019-09-25 11:27:51 -07:00