]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bfd/
authorRoland McGrath <roland@gnu.org>
Wed, 9 Oct 2013 19:40:04 +0000 (19:40 +0000)
committerRoland McGrath <roland@gnu.org>
Wed, 9 Oct 2013 19:40:04 +0000 (19:40 +0000)
* elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Cast switch
expression to int to silence over-eager compiler warnings.

bfd/ChangeLog
bfd/elf64-alpha.c

index fc19cc9498d222c97437b16aeea6ba389c3af83e..e51180d8ddf383b3bfc1e8f6bb937261c5c8b479 100644 (file)
@@ -1,5 +1,8 @@
 2013-10-09  Roland McGrath  <mcgrathr@google.com>
 
+       * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Cast switch
+       expression to int to silence over-eager compiler warnings.
+
        * xcofflink.c (_bfd_xcoff_bfd_final_link): Don't touch EREL in
        loop that doesn't use (or initialize) it.
 
index b70505040f65c7cc87b1209f0f995655d3edd76c..289164fd666a9931047ad8aa66ab2213398f982c 100644 (file)
@@ -1,6 +1,6 @@
 /* Alpha specific support for 64-bit ELF
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007, 2008, 2009, 2010, 2011, 2012
+   2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
    Free Software Foundation, Inc.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -3590,7 +3590,9 @@ elf64_alpha_relax_tls_get_addr (struct alpha_relax_info *info, bfd_vma symval,
   use_gottprel = FALSE;
   new_symndx = is_gd ? ELF64_R_SYM (irel->r_info) : STN_UNDEF;
 
-  switch (!dynamic && !info->link_info->shared)
+  /* Some compilers warn about a Boolean-looking expression being
+     used in a switch.  The explicit cast silences them.  */
+  switch ((int) (!dynamic && !info->link_info->shared))
     {
     case 1:
       {