diff mbox

objc-runtime-shared-support.c - Identical code for different branches

Message ID a7194f6a-1b1c-2d50-a79f-e3af1a4cc436@debian.org
State New
Headers show

Commit Message

Sylvestre Ledru May 14, 2017, 9:58 a.m. UTC
Hello,

Now that Coverity is up and running, I am trying to fix some errors.

Let's start a trivial one (same code in different branches)

S

Comments

Jeff Law May 16, 2017, 1:14 a.m. UTC | #1
On 05/14/2017 03:58 AM, Sylvestre Ledru wrote:
> Hello,
> 
> Now that Coverity is up and running, I am trying to fix some errors.
> 
> Let's start a trivial one (same code in different branches)
> 
> S
> 
> 
> 
> 0001-2017-05-14-Sylvestre-Ledru-sylvestre-debian.org.patch
> 
> 
>  From 50248decd02bfac52ad64b64c972750489e2ffa0 Mon Sep 17 00:00:00 2001
> From: Sylvestre Ledru<sylvestre@debian.org>
> Date: Sun, 14 May 2017 10:55:24 +0200
> Subject: [PATCH 1/5] 2017-05-14  Sylvestre Ledru<sylvestre@debian.org>
> 
> 	* objc-runtime-shared-support.c (build_module_descriptor):
>            Identical code for different branches (since 2012)
>            CID 1406758
OK.  BUt I would rewrite the ChangeLog as

	* objc-runtime-shared-support.c (build_module_descriptor):
  	Remove unnecessary conditional when building instance of
	objc_module.

jeff
diff mbox

Patch

From 50248decd02bfac52ad64b64c972750489e2ffa0 Mon Sep 17 00:00:00 2001
From: Sylvestre Ledru <sylvestre@debian.org>
Date: Sun, 14 May 2017 10:55:24 +0200
Subject: [PATCH 1/5] 2017-05-14  Sylvestre Ledru  <sylvestre@debian.org>

	* objc-runtime-shared-support.c (build_module_descriptor):
          Identical code for different branches (since 2012)
          CID 1406758
---
 gcc/objc/objc-runtime-shared-support.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/gcc/objc/objc-runtime-shared-support.c b/gcc/objc/objc-runtime-shared-support.c
index 8d35d27c031..5ead87078c6 100644
--- a/gcc/objc/objc-runtime-shared-support.c
+++ b/gcc/objc/objc-runtime-shared-support.c
@@ -500,11 +500,7 @@  build_module_descriptor (long vers, tree attr)
   objc_finish_struct (objc_module_template, decls);
 
   /* Create an instance of "_objc_module".  */
-  UOBJC_MODULES_decl = start_var_decl (objc_module_template,
-				       /* FIXME - why the conditional
-					  if the symbol is the
-					  same.  */
-				       flag_next_runtime ? "_OBJC_Module" :  "_OBJC_Module");
+  UOBJC_MODULES_decl = start_var_decl (objc_module_template, "_OBJC_Module");
 
   /* This is the root of the metadata for defined classes and categories, it
      is referenced by the runtime and, therefore, needed.  */
-- 
2.11.0