summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdeel <3840695+am11@users.noreply.github.com>2022-10-13 03:30:20 +0300
committerStephen M. Webb <stephen.webb@bregmasoft.ca>2022-10-14 19:30:38 -0400
commit47aef9392723e4816d94d4efda4248180aece7f5 (patch)
tree77a1b401deeef1993ac319ce54e7267605f02f7a
parent501d8d5e6a06236b87d10a2b1b85008fde3fcbcc (diff)
downloadlibunwind-47aef9392723e4816d94d4efda4248180aece7f5.tar.gz
Fix a few warnings
-rw-r--r--include/libunwind_i.h2
-rw-r--r--src/dwarf/Gexpr.c3
-rw-r--r--src/mi/init.c2
-rw-r--r--src/x86_64/Gtrace.c2
-rw-r--r--tests/test-coredump-unwind.c3
5 files changed, 6 insertions, 6 deletions
diff --git a/include/libunwind_i.h b/include/libunwind_i.h
index 83561240..3ca14625 100644
--- a/include/libunwind_i.h
+++ b/include/libunwind_i.h
@@ -132,7 +132,7 @@ byte_order_is_big_endian(int byte_order)
}
static inline int
-target_is_big_endian()
+target_is_big_endian(void)
{
return byte_order_is_big_endian(UNW_BYTE_ORDER);
}
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))
diff --git a/tests/test-coredump-unwind.c b/tests/test-coredump-unwind.c
index 7db9cb86..b0c1bf51 100644
--- a/tests/test-coredump-unwind.c
+++ b/tests/test-coredump-unwind.c
@@ -244,8 +244,7 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
{
/* glibc extension */
void *array[50];
- int size;
- size = backtrace(array, 50);
+ int size UNUSED = backtrace(array, 50);
#if defined __linux__ && HAVE_EXECINFO_H
backtrace_symbols_fd(array, size, 2);
#endif