summaryrefslogtreecommitdiff
path: root/src
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 /src
parent501d8d5e6a06236b87d10a2b1b85008fde3fcbcc (diff)
downloadlibunwind-47aef9392723e4816d94d4efda4248180aece7f5.tar.gz
Fix a few warnings
Diffstat (limited to 'src')
-rw-r--r--src/dwarf/Gexpr.c3
-rw-r--r--src/mi/init.c2
-rw-r--r--src/x86_64/Gtrace.c2
3 files changed, 4 insertions, 3 deletions
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))