Fix compile time warnings generated when compiling with clang.
[deliverable/binutils-gdb.git] / bfd / bout.c
index f356b96badc12b34556eb299f02be18d22c657ed..d6f188bfa98a1f81b33b505ce3e02cc11a3b1854 100644 (file)
@@ -783,7 +783,7 @@ b_out_slurp_reloc_table (bfd *abfd, sec_ptr asect, asymbol **symbols)
        /* Sign-extend symnum from 24 bits to whatever host uses.  */
        s = symnum;
        if (s & (1 << 23))
-         s |= (~0) << 24;
+         s |= (~0U) << 24;
 
        cache_ptr->sym_ptr_ptr = (asymbol **)NULL;
        switch (s)
@@ -1069,7 +1069,7 @@ abs32code (bfd *abfd,
      jump we were going to.  */
   gap = value - (dot - shrink);
 
-  if (-1 << 23 < (long)gap && (long)gap < 1 << 23)
+  if ((long)(-1UL << 23) < (long)gap && (long)gap < 1L << 23)
     {
       /* Change the reloc type from 32bitcode possible 24, to 24bit
         possible 32.  */
This page took 0.026513 seconds and 4 git commands to generate.