This is the mail archive of the mailing list for the elfutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix type warnings from clang compiler.

On Tue, 2015-09-08 at 15:14 -0700, Chih-hung Hsieh wrote:
> The 4 split patches looked good to me.

Thanks. I pushed them to master.

> Yes, the labs should be llabs to work on 32-bit systems.

OK, I also pushed the attached to fix that.

> About removing the NULL tests of parameters declared with NN,
> I don't mind removing them. I was extra careful not to remove
> any check in case some code could call those functions with
> NULL parameter and without the NN declaration.
> Please let me know if you need me to prepare another patch
> to remove those unnecessary NULL tests

Yes, that would be nice. Lets fix this properly by making sure the
nonnull annotations are correct and to not do any unnecessary NULL
checks in that case.


From 4169187fe3abfda5b7df3eb39ab6bc15d08e13a1 Mon Sep 17 00:00:00 2001
From: Chih-Hung Hsieh <>
Date: Fri, 4 Sep 2015 12:04:11 -0700
Subject: [PATCH] libdwfl: Replace abs with llabs for int64_t values.

Signed-off-by: Chih-Hung Hsieh <>
Signed-off-by: Mark Wielaard <>
 libdwfl/ChangeLog      | 4 ++++
 libdwfl/frame_unwind.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 3e36aa7..2c76369 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-04  Chih-Hung Hsieh  <
+	* frame_unwind.c (expr_eval): Use llabs instead of abs.
 2015-08-14  Dodji Seketeli  <>
 	* find-debuginfo.c (find_debuginfo_in_path): Try to locate the
diff --git a/libdwfl/frame_unwind.c b/libdwfl/frame_unwind.c
index 16cebd0..bd100b8 100644
--- a/libdwfl/frame_unwind.c
+++ b/libdwfl/frame_unwind.c
@@ -342,7 +342,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops,
 	      return false;						\
 	    }								\
-	UNOP (DW_OP_abs, abs ((int64_t) val1))
+	UNOP (DW_OP_abs, llabs ((int64_t) val1))
 	UNOP (DW_OP_neg, -(int64_t) val1)
 	UNOP (DW_OP_not, ~val1)
 #undef UNOP

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]