[PATCH 3/4] libdl/rtl-mdreloc-powerpc.c: Fix warnings
Joel Sherrill
joel.sherrill at oarcorp.com
Wed Nov 19 19:59:47 UTC 2014
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;
}
--
1.9.3
More information about the devel
mailing list