From: Jérémie Galarneau Date: Wed, 21 Apr 2021 18:34:46 +0000 (-0400) Subject: Clean-up: tests: notification-client: unused assignment X-Git-Tag: v2.13.0-rc1~61 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=82e2adac0e195e560ac607f22bf67db267b6d464;p=lttng-tools.git Clean-up: tests: notification-client: unused assignment 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 --- 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");