From 47aef9392723e4816d94d4efda4248180aece7f5 Mon Sep 17 00:00:00 2001 From: Adeel <3840695+am11@users.noreply.github.com> Date: Thu, 13 Oct 2022 03:30:20 +0300 Subject: Fix a few warnings --- src/dwarf/Gexpr.c | 3 ++- src/mi/init.c | 2 +- src/x86_64/Gtrace.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/dwarf/Gexpr.c b/src/dwarf/Gexpr.c index c510795b..22747c63 100644 --- a/src/dwarf/Gexpr.c +++ b/src/dwarf/Gexpr.c @@ -578,7 +578,8 @@ if (stackerror) \ case DW_OP_neg: Debug (15, "OP_neg\n"); - push (~pop () + 1); + unw_word_t tmp UNUSED = pop (); + push (~tmp + 1); break; case DW_OP_not: diff --git a/src/mi/init.c b/src/mi/init.c index aa931998..e4431eeb 100644 --- a/src/mi/init.c +++ b/src/mi/init.c @@ -41,7 +41,7 @@ long unwi_debug_level; #endif /* UNW_DEBUG */ long unw_page_size; static void -unw_init_page_size () +unw_init_page_size (void) { errno = 0; long result = sysconf (_SC_PAGESIZE); diff --git a/src/x86_64/Gtrace.c b/src/x86_64/Gtrace.c index 963a858f..7f896419 100644 --- a/src/x86_64/Gtrace.c +++ b/src/x86_64/Gtrace.c @@ -404,7 +404,7 @@ tdep_trace (unw_cursor_t *cursor, void **buffer, int *size) int maxdepth = 0; int depth = 0; int ret; - int validate = 0; + int validate UNUSED = 0; /* Check input parametres. */ if (unlikely(! cursor || ! buffer || ! size || (maxdepth = *size) <= 0)) -- cgit v1.2.1