From 6fc34371e1df4d74dee6e50ffd9d9fae234b55ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Thu, 7 Apr 2022 22:49:22 +0200 Subject: [PATCH] libzfs: pool: fix false-positives -Wmaybe-uninitialised MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As noted by gcc (Debian 10.2.1-6) 10.2.1 20210110 Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia ZiemiaƄska Closes #13316 --- lib/libzfs/libzfs_pool.c | 4 ++-- module/icp/algs/edonr/edonr.c | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c index cd7062a88c..83fab04336 100644 --- a/lib/libzfs/libzfs_pool.c +++ b/lib/libzfs/libzfs_pool.c @@ -5184,7 +5184,7 @@ zpool_get_vdev_prop(zpool_handle_t *zhp, const char *vdevname, vdev_prop_t prop, { nvlist_t *reqnvl, *reqprops; nvlist_t *retprops = NULL; - uint64_t vdev_guid; + uint64_t vdev_guid = 0; int ret; if ((ret = zpool_vdev_guid(zhp, vdevname, &vdev_guid)) != 0) @@ -5243,7 +5243,7 @@ zpool_get_all_vdev_props(zpool_handle_t *zhp, const char *vdevname, nvlist_t **outnvl) { nvlist_t *nvl = NULL; - uint64_t vdev_guid; + uint64_t vdev_guid = 0; int ret; if ((ret = zpool_vdev_guid(zhp, vdevname, &vdev_guid)) != 0) diff --git a/module/icp/algs/edonr/edonr.c b/module/icp/algs/edonr/edonr.c index 6f3a43e263..9388a6f6b7 100644 --- a/module/icp/algs/edonr/edonr.c +++ b/module/icp/algs/edonr/edonr.c @@ -47,10 +47,7 @@ #define hashState384(x) ((x)->pipe->p512) #define hashState512(x) ((x)->pipe->p512) -/* shift and rotate shortcuts */ -#define shl(x, n) ((x) << n) -#define shr(x, n) ((x) >> n) - +/* rotate shortcuts */ #define rotl32(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) #define rotr32(x, n) (((x) >> (n)) | ((x) << (32 - (n))))