[FYI] Two minor constifications
Commit Message
I noticed a couple of spots where a "char *" was used where a
"const char *" made more sense. This patch fixes both of them.
Tested by rebuilding.
gdb/ChangeLog
2019-05-10 Tom Tromey <tromey@adacore.com>
* thread.c (print_thread_info): Make "requested_threads" const.
* gdbthread.h (print_thread_info): Make "requested_threads"
const.
* ada-tasks.c (print_ada_task_info): Make "taskno_str" const.
* ada-lang.h (print_ada_task_info): Make "taskno_str" const.
---
gdb/ChangeLog | 8 ++++++++
gdb/ada-lang.h | 2 +-
gdb/ada-tasks.c | 2 +-
gdb/gdbthread.h | 3 ++-
gdb/thread.c | 3 ++-
5 files changed, 14 insertions(+), 4 deletions(-)
@@ -412,7 +412,7 @@ extern void iterate_over_live_ada_tasks
extern const char *ada_get_tcb_types_info (void);
extern void print_ada_task_info (struct ui_out *uiout,
- char *taskno_str,
+ const char *taskno_str,
struct inferior *inf);
#endif
@@ -1001,7 +1001,7 @@ ada_build_task_list ()
void
print_ada_task_info (struct ui_out *uiout,
- char *arg_str,
+ const char *arg_str,
struct inferior *inf)
{
struct ada_tasks_inferior_data *data;
@@ -632,7 +632,8 @@ extern int print_thread_events;
all attached PIDs are printed. If both REQUESTED_THREADS is not
NULL and PID is not -1, then the thread is printed if it belongs to
the specified process. Otherwise, an error is raised. */
-extern void print_thread_info (struct ui_out *uiout, char *requested_threads,
+extern void print_thread_info (struct ui_out *uiout,
+ const char *requested_threads,
int pid);
/* Save/restore current inferior/thread/frame. */
@@ -1191,7 +1191,8 @@ No selected thread. See `help thread'.\n");
/* See gdbthread.h. */
void
-print_thread_info (struct ui_out *uiout, char *requested_threads, int pid)
+print_thread_info (struct ui_out *uiout, const char *requested_threads,
+ int pid)
{
print_thread_info_1 (uiout, requested_threads, 1, pid, 0);
}