summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkasperk81 <83082615+kasperk81@users.noreply.github.com>2022-10-15 21:24:11 +0000
committerStephen M. Webb <stephen.webb@bregmasoft.ca>2022-10-21 12:08:18 -0400
commitfbaa4d5b0c47a4129ff7e514bdecc284635b36e9 (patch)
treeb8957c0651723ad989af9418c68b0e6c6b5bdc17
parent47aef9392723e4816d94d4efda4248180aece7f5 (diff)
downloadlibunwind-fbaa4d5b0c47a4129ff7e514bdecc284635b36e9.tar.gz
fix more warnings
-rw-r--r--include/dwarf.h2
-rw-r--r--src/coredump/ucd_file_table.c2
-rw-r--r--src/dwarf/Gexpr.c4
-rw-r--r--src/dwarf/Gfind_unwind_table.c2
-rw-r--r--src/x86_64/Ginit.c2
-rw-r--r--tests/test-coredump-unwind.c2
6 files changed, 7 insertions, 7 deletions
diff --git a/include/dwarf.h b/include/dwarf.h
index 23ff4c4f..dd9014b7 100644
--- a/include/dwarf.h
+++ b/include/dwarf.h
@@ -422,7 +422,7 @@ extern int dwarf_search_unwind_table (unw_addr_space_t as,
int need_unwind_info, void *arg);
extern int dwarf_find_unwind_table (struct elf_dyn_info *edi, unw_addr_space_t as,
- char *path, unw_word_t segbase, unw_word_t mapoff,
+ const char *path, unw_word_t segbase, unw_word_t mapoff,
unw_word_t ip);
extern void dwarf_put_unwind_info (unw_addr_space_t as,
unw_proc_info_t *pi, void *arg);
diff --git a/src/coredump/ucd_file_table.c b/src/coredump/ucd_file_table.c
index 15e07047..cde693db 100644
--- a/src/coredump/ucd_file_table.c
+++ b/src/coredump/ucd_file_table.c
@@ -189,7 +189,7 @@ ucd_file_table_dispose (ucd_file_table_t *ucd_file_table)
{
if (ucd_file_table->uft_files != NULL)
{
- for (int i = 0; i < ucd_file_table->uft_count; ++i)
+ for (size_t i = 0; i < ucd_file_table->uft_count; ++i)
{
ucd_file_dispose(&ucd_file_table->uft_files[i]);
}
diff --git a/src/dwarf/Gexpr.c b/src/dwarf/Gexpr.c
index 22747c63..882f4dac 100644
--- a/src/dwarf/Gexpr.c
+++ b/src/dwarf/Gexpr.c
@@ -578,8 +578,8 @@ if (stackerror) \
case DW_OP_neg:
Debug (15, "OP_neg\n");
- unw_word_t tmp UNUSED = pop ();
- push (~tmp + 1);
+ tmp1 = pop ();
+ push (~tmp1 + 1);
break;
case DW_OP_not:
diff --git a/src/dwarf/Gfind_unwind_table.c b/src/dwarf/Gfind_unwind_table.c
index ad9b4e9a..fb20fea0 100644
--- a/src/dwarf/Gfind_unwind_table.c
+++ b/src/dwarf/Gfind_unwind_table.c
@@ -37,7 +37,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
int
dwarf_find_unwind_table (struct elf_dyn_info *edi, unw_addr_space_t as,
- char *path, unw_word_t segbase, unw_word_t mapoff,
+ const char *path, unw_word_t segbase, unw_word_t mapoff,
unw_word_t ip)
{
Elf_W(Phdr) *phdr, *ptxt = NULL, *peh_hdr = NULL, *pdyn = NULL;
diff --git a/src/x86_64/Ginit.c b/src/x86_64/Ginit.c
index e75f92a5..88146a3e 100644
--- a/src/x86_64/Ginit.c
+++ b/src/x86_64/Ginit.c
@@ -79,7 +79,7 @@ static int mem_validate_pipe[2] = {-1, -1};
static inline void
do_pipe2 (int pipefd[2])
{
- pipe2 (pipefd, O_CLOEXEC | O_NONBLOCK);
+ int result UNUSED = pipe2 (pipefd, O_CLOEXEC | O_NONBLOCK);
}
#else
static inline void
diff --git a/tests/test-coredump-unwind.c b/tests/test-coredump-unwind.c
index b0c1bf51..5c296004 100644
--- a/tests/test-coredump-unwind.c
+++ b/tests/test-coredump-unwind.c
@@ -141,7 +141,7 @@ static void verror_msg_helper(const char *s,
if (flags & LOGMODE_STDIO)
{
fflush(stdout);
- write(STDERR_FILENO, msg, used + msgeol_len);
+ ssize_t written UNUSED = write(STDERR_FILENO, msg, used + msgeol_len);
}
msg[used] = '\0'; /* remove msg_eol (usually "\n") */
if (flags & LOGMODE_SYSLOG)