This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
[patch 2/4] Code cleanup: Remove const in prototype
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Sun, 10 Nov 2013 21:21:20 +0100
- Subject: [patch 2/4] Code cleanup: Remove const in prototype
Hi Mark,
jankratochvil/ynonx86base-attach-firstreg
cv-qualifier in declaration has no effect on callers but the parameter needs
to be modified in function implementation in [patch 3/4]. To keep the code
consistent I have removed it everywhere.
Thanks,
Jan
Code cleanup: Remove const in prototype
libdwfl/
2013-11-10 Jan Kratochvil <jan.kratochvil@redhat.com>
Code cleanup: Remove const in prototype
* dwfl_frame_regs.c (dwfl_thread_state_registers): Remove const from
firstreg.
* libdwfl.h (dwfl_thread_state_registers): Likewise.
* linux-pid-attach.c (pid_thread_state_registers_cb): Likewise.
libebl/
2013-11-10 Jan Kratochvil <jan.kratochvil@redhat.com>
Code cleanup: Remove const in prototype
* libebl.h (ebl_tid_registers_t): Remove const from firstreg.
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
--- a/libdwfl/dwfl_frame_regs.c
+++ b/libdwfl/dwfl_frame_regs.c
@@ -29,7 +29,7 @@
#include "libdwflP.h"
bool
-dwfl_thread_state_registers (Dwfl_Thread *thread, const int firstreg,
+dwfl_thread_state_registers (Dwfl_Thread *thread, int firstreg,
unsigned nregs, const Dwarf_Word *regs)
{
Dwfl_Frame *state = thread->unwound;
--- a/libdwfl/libdwfl.h
+++ b/libdwfl/libdwfl.h
@@ -657,7 +657,7 @@ Dwfl_Thread *dwfl_frame_thread (Dwfl_Frame *state)
For every known continuous block of registers <FIRSTREG..FIRSTREG+NREGS)
(inclusive..exclusive) set their content to REGS (array of NREGS items).
Function returns false if any of the registers has invalid number. */
-bool dwfl_thread_state_registers (Dwfl_Thread *thread, const int firstreg,
+bool dwfl_thread_state_registers (Dwfl_Thread *thread, int firstreg,
unsigned nregs, const Dwarf_Word *regs)
__nonnull_attribute__ (1, 4);
--- a/libdwfl/linux-pid-attach.c
+++ b/libdwfl/linux-pid-attach.c
@@ -198,10 +198,8 @@ pid_next_thread (Dwfl *dwfl __attribute__ ((unused)), void *dwfl_arg,
/* Implement the ebl_set_initial_registers_tid setfunc callback. */
static bool
-pid_thread_state_registers_cb (const int firstreg,
- unsigned nregs,
- const Dwarf_Word *regs,
- void *arg)
+pid_thread_state_registers_cb (int firstreg, unsigned nregs,
+ const Dwarf_Word *regs, void *arg)
{
Dwfl_Thread *thread = (Dwfl_Thread *) arg;
return INTUSE(dwfl_thread_state_registers) (thread, firstreg, nregs, regs);
--- a/libebl/libebl.h
+++ b/libebl/libebl.h
@@ -384,10 +384,8 @@ extern int ebl_auxv_info (Ebl *ebl, GElf_Xword a_type,
__nonnull_attribute__ (1, 3, 4);
/* Callback type for ebl_set_initial_registers_tid. */
-typedef bool (ebl_tid_registers_t) (const int firstreg,
- unsigned nregs,
- const Dwarf_Word *regs,
- void *arg)
+typedef bool (ebl_tid_registers_t) (int firstreg, unsigned nregs,
+ const Dwarf_Word *regs, void *arg)
__nonnull_attribute__ (3);
/* Callback to fetch process data from live TID.