From e8cba7739e3ac3be07559df99a0efa167bc735bc Mon Sep 17 00:00:00 2001 From: Thales Antunes de Oliveira Barretto Date: Thu, 19 Feb 2026 23:45:38 -0300 Subject: [PATCH] Fix dead assignemnt in glfs_h_create_from_handle A dead asssignment flagged by clang in glfs_h_create_from_handle occurs under the label 'found' when GF_CALLOC fails, when 'ret = -1' but in that path we end up bailing out and never using that value. Since we do not even return this value, the fix is just remove this dead line. --- api/src/glfs-handleops.c | 1 - 1 file changed, 1 deletion(-) diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c index e9f74e8838..0595a0a7a1 100644 --- a/api/src/glfs-handleops.c +++ b/api/src/glfs-handleops.c @@ -1501,7 +1501,6 @@ pub_glfs_h_create_from_handle(struct glfs *fs, unsigned char *handle, int len, object = GF_CALLOC(1, sizeof(struct glfs_object), glfs_mt_glfs_object_t); if (object == NULL) { errno = ENOMEM; - ret = -1; goto out; }