summaryrefslogtreecommitdiff
path: root/include/libunwind_i.h
diff options
context:
space:
mode:
authorArun Sharma <aruns@google.com>2009-10-16 14:01:50 -0700
committerArun Sharma <aruns@google.com>2009-10-16 14:01:50 -0700
commit491d576529a3b01208accb37627a075d7ce07093 (patch)
tree16b32165f6084520b98c52d3826967ad3e1617a3 /include/libunwind_i.h
parentaf9daf66afde3c92b2c7c4f171bf3414c623892c (diff)
downloadlibunwind-491d576529a3b01208accb37627a075d7ce07093.tar.gz
Fix compiler warnings on x86_64
Diffstat (limited to 'include/libunwind_i.h')
-rw-r--r--include/libunwind_i.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/libunwind_i.h b/include/libunwind_i.h
index f20fcbc8..3e553e2c 100644
--- a/include/libunwind_i.h
+++ b/include/libunwind_i.h
@@ -178,6 +178,11 @@ typedef sigset_t intrmask_t;
extern intrmask_t unwi_full_mask;
+/* Silence compiler warnings about variables which are used only if libunwind
+ is configured in a certain way */
+static inline void mark_as_used(void *v) {
+}
+
#if defined(CONFIG_BLOCK_SIGNALS)
# define SIGPROCMASK(how, new_mask, old_mask) \
sigprocmask((how), (new_mask), (old_mask))
@@ -191,11 +196,13 @@ extern intrmask_t unwi_full_mask;
#define lock_acquire(l,m) \
do { \
SIGPROCMASK (SIG_SETMASK, &unwi_full_mask, &(m)); \
+ mark_as_used(&(m)); \
mutex_lock (l); \
} while (0)
#define lock_release(l,m) \
do { \
mutex_unlock (l); \
+ mark_as_used(&(m)); \
SIGPROCMASK (SIG_SETMASK, &(m), NULL); \
} while (0)
@@ -272,10 +279,10 @@ do { \
# define Dprintf(format...)
#endif
-static ALWAYS_INLINE void
+static ALWAYS_INLINE int
print_error (const char *string)
{
- write (2, string, strlen (string));
+ return write (2, string, strlen (string));
}
#define mi_init UNWI_ARCH_OBJ(mi_init)