This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch feature/error_injector
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/feature/error_injector by this 
push:
     new 70918d78 Fix new gcc warning after upgrading CI.
70918d78 is described below

commit 70918d78c40c90adbe974cf55326bd4192f2e7e3
Author: PengZheng <[email protected]>
AuthorDate: Thu Jan 19 23:01:00 2023 +0800

    Fix new gcc warning after upgrading CI.
---
 misc/error_injector/error_injector.h | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/misc/error_injector/error_injector.h 
b/misc/error_injector/error_injector.h
index 26e5825e..b4126fc6 100644
--- a/misc/error_injector/error_injector.h
+++ b/misc/error_injector/error_injector.h
@@ -27,13 +27,11 @@ extern "C" {
 #include <dlfcn.h>
 #include <stddef.h>
 
-#define CELIX_EI_GET_CALLER(addr, level)        \
-do {                                            \
-    Dl_info dlinfo;                             \
-    void *dlret;                                \
-    dlret = __builtin_return_address((level));  \
-    assert(dladdr(dlret, &dlinfo));             \
-    (addr) = dlinfo.dli_saddr;                  \
+#define CELIX_EI_GET_CALLER(addr, level)                                   \
+do {                                                                       \
+    Dl_info dlinfo;                                                        \
+    assert(dladdr(__builtin_return_address((level), &dlinfo));             \
+    (addr) = dlinfo.dli_saddr;                                             \
 } while(0)
 
 #define CELIX_EI_UNKNOWN_CALLER ((void *)-1)

Reply via email to