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>] [day] [month] [year] [list]
Message-ID: <92605b0b9589ffc556dfd0d279635dc9@208suo.com>
Date:   Wed, 14 Jun 2023 14:36:09 +0800
From:   baomingtong001@...suo.com
To:     jpoimboe@...nel.org, peterz@...radead.org
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] objtool: remove unneeded variable from add_prefix_symbols()

fix the following coccicheck warning:

tools/objtool/check.c:4135:5-13: Unneeded variable: "warnings". Return 
"0".

Signed-off-by: Mingtong Bao <baomingtong001@...suo.com>
---
  tools/objtool/check.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index a13c257f80dd..d12de0e2cf00 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -4132,7 +4132,6 @@ static int add_prefix_symbols(struct objtool_file 
*file)
  {
      struct section *sec;
      struct symbol *func;
-    int warnings = 0;

      for_each_sec(file, sec) {
          if (!(sec->sh.sh_flags & SHF_EXECINSTR))
@@ -4146,7 +4145,7 @@ static int add_prefix_symbols(struct objtool_file 
*file)
          }
      }

-    return warnings;
+    return 0;
  }

  static int validate_symbol(struct objtool_file *file, struct section 
*sec,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ