From 82e2adac0e195e560ac607f22bf67db267b6d464 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 21 Apr 2021 14:34:46 -0400 Subject: [PATCH] Clean-up: tests: notification-client: unused assignment MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 1452629 Unused value An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring. In main: A value assigned to a variable is never used. (CWE-563) CID 1452629 (#1 of 1): Unused value (UNUSED_VALUE)assigned_value: Assigning value -1 to ret here, but that stored value is overwritten before it can be used Reported-by: Coverity Scan Signed-off-by: Jérémie Galarneau Change-Id: I0d80a244a7b2b3d6aed57d58ca5435230d664f99 --- tests/regression/tools/trigger/utils/notification-client.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/regression/tools/trigger/utils/notification-client.c b/tests/regression/tools/trigger/utils/notification-client.c index 54248f633..cd1f8ea70 100644 --- a/tests/regression/tools/trigger/utils/notification-client.c +++ b/tests/regression/tools/trigger/utils/notification-client.c @@ -240,7 +240,6 @@ int main(int argc, char **argv) break; case LTTNG_NOTIFICATION_CHANNEL_STATUS_CLOSED: printf("Notification channel was closed by peer.\n"); - ret = -1; break; default: fprintf(stderr, "A communication error occurred on the notification channel.\n"); -- 2.34.1