mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-06 00:00:49 +03:00
Use the correct return type for getopt
Use the correct return type for getopt otherwise clang complains about tautological-constant-out-of-range-compare. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Sterling Jensen <sterlingjensen@users.noreply.github.com> Closes #11359
This commit is contained in:
parent
489633d99a
commit
2ab24dfded
@ -8370,7 +8370,7 @@ zfs_do_wait(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
boolean_t enabled[ZFS_WAIT_NUM_ACTIVITIES];
|
boolean_t enabled[ZFS_WAIT_NUM_ACTIVITIES];
|
||||||
int error, i;
|
int error, i;
|
||||||
char c;
|
int c;
|
||||||
|
|
||||||
/* By default, wait for all types of activity. */
|
/* By default, wait for all types of activity. */
|
||||||
for (i = 0; i < ZFS_WAIT_NUM_ACTIVITIES; i++)
|
for (i = 0; i < ZFS_WAIT_NUM_ACTIVITIES; i++)
|
||||||
|
@ -44,7 +44,7 @@ int
|
|||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
boolean_t verbose = B_FALSE;
|
boolean_t verbose = B_FALSE;
|
||||||
char c;
|
int c;
|
||||||
while ((c = getopt(argc, argv, "v")) != -1) {
|
while ((c = getopt(argc, argv, "v")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'v':
|
case 'v':
|
||||||
|
@ -10062,7 +10062,7 @@ int
|
|||||||
zpool_do_wait(int argc, char **argv)
|
zpool_do_wait(int argc, char **argv)
|
||||||
{
|
{
|
||||||
boolean_t verbose = B_FALSE;
|
boolean_t verbose = B_FALSE;
|
||||||
char c;
|
int c;
|
||||||
char *value;
|
char *value;
|
||||||
int i;
|
int i;
|
||||||
unsigned long count;
|
unsigned long count;
|
||||||
|
@ -421,7 +421,7 @@ int
|
|||||||
zstream_do_redup(int argc, char *argv[])
|
zstream_do_redup(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
boolean_t verbose = B_FALSE;
|
boolean_t verbose = B_FALSE;
|
||||||
char c;
|
int c;
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "v")) != -1) {
|
while ((c = getopt(argc, argv, "v")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
@ -457,7 +457,7 @@ main(int argc, char *argv[])
|
|||||||
int failed_tests = 0;
|
int failed_tests = 0;
|
||||||
struct timeval tp;
|
struct timeval tp;
|
||||||
zfs_btree_t bt;
|
zfs_btree_t bt;
|
||||||
char c;
|
int c;
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "c:l:n:r:st:")) != -1) {
|
while ((c = getopt(argc, argv, "c:l:n:r:st:")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
Loading…
Reference in New Issue
Block a user