lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220524182244.42987-1-gautammenghani201@gmail.com>
Date:   Tue, 24 May 2022 11:22:44 -0700
From:   Gautam Menghani <gautammenghani201@...il.com>
To:     akpm@...ux-foundation.org, shakeelb@...gle.com,
        vasily.averin@...ux.dev, mhocko@...e.com, manfred@...orfullife.com
Cc:     Gautam Menghani <gautammenghani201@...il.com>,
        linux-kernel@...r.kernel.org,
        linux-kernel-mentees@...ts.linuxfoundation.org,
        skhan@...uxfoundation.org
Subject: [PATCH] ipc: Remove dead code in perform_atomic_semop()

Remove the line which is dead code. Fixes the clang scan warning:
warning: Value stored to 'result' is never read [deadcode.DeadStores]
                result = curr->semval;

Signed-off-by: Gautam Menghani <gautammenghani201@...il.com>
---
 ipc/sem.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ipc/sem.c b/ipc/sem.c
index 0dbdb98fdf2d..156824bcda47 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -766,7 +766,6 @@ static int perform_atomic_semop(struct sem_array *sma, struct sem_queue *q)
 	for (sop = sops; sop < sops + nsops; sop++) {
 		curr = &sma->sems[sop->sem_num];
 		sem_op = sop->sem_op;
-		result = curr->semval;
 
 		if (sop->sem_flg & SEM_UNDO) {
 			int undo = un->semadj[sop->sem_num] - sem_op;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ