This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Silence a build-time warning about constant comparisons when building with clang,


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6ba2ed48c8cb591c1ccac172be7f895f59080cfa

commit 6ba2ed48c8cb591c1ccac172be7f895f59080cfa
Author: Nick Clifton <nickc@redhat.com>
Date:   Wed Sep 25 14:34:23 2019 +0100

    Silence a build-time warning about constant comparisons when building with clang,
    
     * emultempl/avrelf.em (_before_allocation): Silence build warning
     using clang.

Diff:
---
 ld/ChangeLog           | 5 +++++
 ld/emultempl/avrelf.em | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 0e550d2..d38c861 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2019-09-25  Nick Clifton  <nickc@redhat.com>
+
+	* emultempl/avrelf.em (_before_allocation): Silence build warning
+	using clang.
+
 2019-09-23  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* testsuite/ld-plugin/pr24406-1.c (main): Correct buffer size
diff --git a/ld/emultempl/avrelf.em b/ld/emultempl/avrelf.em
index f3d1082..48675ef 100644
--- a/ld/emultempl/avrelf.em
+++ b/ld/emultempl/avrelf.em
@@ -77,10 +77,10 @@ avr_elf_${EMULATION_NAME}_before_allocation (void)
       return;
     }
 
-  /* We only need stubs for avr6, avrxmega6, and avrxmega7. */
-  if (strcmp ("${EMULATION_NAME}","avr6")
-      && strcmp ("${EMULATION_NAME}","avrxmega6")
-      && strcmp ("${EMULATION_NAME}","avrxmega7") )
+  /* We only need stubs for avr6, avrxmega6, and avrxmega7.  */
+  if (strcmp ("${EMULATION_NAME}", "avr6") != 0
+      && strcmp ("${EMULATION_NAME}", "avrxmega6") != 0
+      && strcmp ("${EMULATION_NAME}", "avrxmega7") != 0)
     avr_no_stubs = TRUE;
 
   avr_elf_set_global_bfd_parameters ();


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]