summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-03-12 11:04:48 +0000
committerdim <dim@FreeBSD.org>2012-03-12 11:04:48 +0000
commitc2c20240edfb27db7219b74681fa5f2038f13246 (patch)
tree39c31fc787c40e47444fefc56aa7808646ea6216 /libexec
parent7654527e54953ea42e7a35136d0521bb4ae4b225 (diff)
downloadFreeBSD-src-c2c20240edfb27db7219b74681fa5f2038f13246.zip
FreeBSD-src-c2c20240edfb27db7219b74681fa5f2038f13246.tar.gz
Fix the following warning/error with clang:
libexec/rtld-elf/rtld.c:1898:22: error: comparison between pointer and integer ('Elf_Addr *' (aka 'unsigned int *') and 'Elf_Addr' (aka 'unsigned int')) [-Werror] if (preinit_addr == (Elf_Addr)NULL) ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ libexec/rtld-elf/rtld.c:2039:16: error: comparison between pointer and integer ('Elf_Addr *' (aka 'unsigned int *') and 'Elf_Addr' (aka 'unsigned int')) [-Werror] if (init_addr != (Elf_Addr)NULL) { ~~~~~~~~~ ^ ~~~~~~~~~~~~~~ Reviewed by: kib
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-elf/rtld.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 66a9b98..5357d9c 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -1895,7 +1895,7 @@ preinit_main(void)
int index;
preinit_addr = (Elf_Addr *)obj_main->preinit_array;
- if (preinit_addr == (Elf_Addr)NULL)
+ if (preinit_addr == (Elf_Addr *)NULL)
return;
for (index = 0; index < obj_main->preinit_array_num; index++) {
@@ -2036,7 +2036,7 @@ objlist_call_init(Objlist *list, RtldLockState *lockstate)
call_initfini_pointer(elm->obj, elm->obj->init);
}
init_addr = (Elf_Addr *)elm->obj->init_array;
- if (init_addr != (Elf_Addr)NULL) {
+ if (init_addr != (Elf_Addr *)NULL) {
for (index = 0; index < elm->obj->init_array_num; index++) {
if (init_addr[index] != 0 && init_addr[index] != 1) {
dbg("calling init function for %s at %p", elm->obj->path,
OpenPOWER on IntegriCloud