mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Rename fallthrough to zfs_fallthrough
Unfortunately macOS has obj-C keyword "fallthrough" in the OS headers. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Jorgen Lundman <lundman@lundman.net> Closes #13097
This commit is contained in:
@@ -30,11 +30,11 @@
|
||||
#define ____cacheline_aligned
|
||||
#define __NORETURN __attribute__((__noreturn__))
|
||||
|
||||
#if !defined(fallthrough) && !defined(_LIBCPP_VERSION)
|
||||
#if !defined(zfs_fallthrough) && !defined(_LIBCPP_VERSION)
|
||||
#if defined(HAVE_IMPLICIT_FALLTHROUGH)
|
||||
#define fallthrough __attribute__((__fallthrough__))
|
||||
#define zfs_fallthrough __attribute__((__fallthrough__))
|
||||
#else
|
||||
#define fallthrough ((void)0)
|
||||
#define zfs_fallthrough ((void)0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1363,7 +1363,7 @@ badlabel:
|
||||
(void) zfs_error(hdl, EZFS_BADPROP, errbuf);
|
||||
goto error;
|
||||
}
|
||||
fallthrough;
|
||||
zfs_fallthrough;
|
||||
}
|
||||
|
||||
case ZFS_PROP_SHARESMB:
|
||||
@@ -3783,7 +3783,7 @@ zfs_create(libzfs_handle_t *hdl, const char *path, zfs_type_t type,
|
||||
if (type == ZFS_TYPE_VOLUME)
|
||||
return (zfs_error(hdl, EZFS_VOLTOOBIG,
|
||||
errbuf));
|
||||
fallthrough;
|
||||
zfs_fallthrough;
|
||||
#endif
|
||||
default:
|
||||
return (zfs_standard_error(hdl, errno, errbuf));
|
||||
|
||||
@@ -316,7 +316,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf,
|
||||
len);
|
||||
break;
|
||||
}
|
||||
fallthrough;
|
||||
zfs_fallthrough;
|
||||
default:
|
||||
(void) strlcpy(buf, "-", len);
|
||||
break;
|
||||
@@ -407,7 +407,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf,
|
||||
(void) snprintf(buf, len, "-");
|
||||
break;
|
||||
}
|
||||
fallthrough;
|
||||
zfs_fallthrough;
|
||||
default:
|
||||
(void) snprintf(buf, len, "%llu", (u_longlong_t)intval);
|
||||
}
|
||||
|
||||
@@ -4947,7 +4947,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
|
||||
(void) zfs_error(hdl, EZFS_BUSY, errbuf);
|
||||
break;
|
||||
}
|
||||
fallthrough;
|
||||
zfs_fallthrough;
|
||||
default:
|
||||
(void) zfs_standard_error(hdl, ioctl_errno, errbuf);
|
||||
}
|
||||
|
||||
@@ -600,8 +600,8 @@ zfs_setprop_error(libzfs_handle_t *hdl, zfs_prop_t prop, int err,
|
||||
(void) zfs_error(hdl, EZFS_VOLTOOBIG, errbuf);
|
||||
break;
|
||||
}
|
||||
zfs_fallthrough;
|
||||
#endif
|
||||
fallthrough;
|
||||
default:
|
||||
(void) zfs_standard_error(hdl, err, errbuf);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ lzbe_set_boot_device(const char *pool, lzbe_flags_t flag, const char *device)
|
||||
/* Drop this nvlist */
|
||||
fnvlist_free(nv);
|
||||
}
|
||||
fallthrough;
|
||||
zfs_fallthrough;
|
||||
case lzbe_replace:
|
||||
nv = fnvlist_alloc();
|
||||
break;
|
||||
|
||||
@@ -1032,11 +1032,11 @@ zpool_read_label(int fd, nvlist_t **config, int *num_labels)
|
||||
// This shouldn't be possible to
|
||||
// encounter, die if we do.
|
||||
ASSERT(B_FALSE);
|
||||
fallthrough;
|
||||
zfs_fallthrough;
|
||||
case EOPNOTSUPP:
|
||||
case ENOSYS:
|
||||
do_slow = B_TRUE;
|
||||
fallthrough;
|
||||
zfs_fallthrough;
|
||||
case 0:
|
||||
default:
|
||||
(void) aio_return(&aiocbs[l]);
|
||||
|
||||
Reference in New Issue
Block a user