]> git.proxmox.com Git - mirror_zfs.git/commit
fix: variable type with zfs-tests/cmd/clonefile.c
authorTino Reichardt <milky-zfs@mcmilk.de>
Wed, 17 Jan 2024 17:06:14 +0000 (18:06 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 19 Jan 2024 20:28:02 +0000 (12:28 -0800)
commitc1161e28513410a3f566a0e10b48e54b11b19e59
treefdb55ad081794f29f3484a9f3e096f1bc02ea43a
parentef527958c6a1fc07177636465194625ef8e64083
fix: variable type with zfs-tests/cmd/clonefile.c

Compiling on arm64 freebsd-13.2 and arm64 almalinux-8 brings currently
this error:

```
  CC       tests/zfs-tests/cmd/clonefile.o
tests/zfs-tests/cmd/clonefile.c:166:43: error: result of comparison of \
constant -1 with expression of type 'char' is always true \
[-Werror,-Wtautological-constant-out-of-range-compare]
        while ((c = getopt(argc, argv, "crfdq")) != -1) {
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~
1 error generated.
gmake[2]: *** [Makefile:8675: tests/zfs-tests/cmd/clonefile.o] Error 1
```

Fix: use correct variable type `int`.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes #15783
tests/zfs-tests/cmd/clonefile.c