[rtems commit] libdl/rtl-mdreloc-powerpc.c: Fix warnings
Joel Sherril
joel at rtems.org
Thu Nov 20 18:57:49 UTC 2014
Module: rtems
Branch: master
Commit: a5201ea4d0e670b868f5c2d2b944395e865a013c
Changeset: http://git.rtems.org/rtems/commit/?id=a5201ea4d0e670b868f5c2d2b944395e865a013c
Author: Joel Sherrill <joel.sherrill at oarcorp.com>
Date: Wed Nov 19 13:57:21 2014 -0600
libdl/rtl-mdreloc-powerpc.c: Fix warnings
This patch addresses the following warnings:
+ The variable "target" was unused.
+ The parentheses in the expression around line 72 were ambiguous.
---
cpukit/libdl/rtl-mdreloc-powerpc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/cpukit/libdl/rtl-mdreloc-powerpc.c b/cpukit/libdl/rtl-mdreloc-powerpc.c
index d1c0a4f..6909167 100644
--- a/cpukit/libdl/rtl-mdreloc-powerpc.c
+++ b/cpukit/libdl/rtl-mdreloc-powerpc.c
@@ -35,7 +35,6 @@ rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
const Elf_Byte syminfo,
const Elf_Word symvalue)
{
- Elf_Addr target = 0;
Elf_Addr* where;
Elf_Word tmp;
uint32_t mask = 0;
@@ -72,7 +71,7 @@ rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
mask = 0x3fffffc;
}
tmp = (symvalue + rela->r_addend) >> 2;
- if (tmp > (1<<bits -1 )) {
+ if (tmp > ((1<<bits) - 1 )) {
printf("Overflow ADDR14/ADDR24\n");
return false;
}
More information about the vc
mailing list