aboutsummaryrefslogtreecommitdiff
path: root/gdb/sol-thread.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-04-05 19:21:37 +0100
committerPedro Alves <palves@redhat.com>2017-04-05 19:21:37 +0100
commit995816ba55d952b2823d2ead66495c5cad6dfe58 (patch)
treed2d9a758f0156e7589f4f6be87a483e8fe3cd6f4 /gdb/sol-thread.c
parent3e83a920090130052a407621b94b94513f539fda (diff)
downloadgdb-995816ba55d952b2823d2ead66495c5cad6dfe58.zip
gdb-995816ba55d952b2823d2ead66495c5cad6dfe58.tar.gz
gdb-995816ba55d952b2823d2ead66495c5cad6dfe58.tar.bz2
-Wwrite-strings: More Solaris
Some obvious constifications found by attempting to build 64-bit GDB on Solaris 11. gdb/ChangeLog: 2017-04-05 Pedro Alves <palves@redhat.com> * proc-api.c (struct trans): Constify. (procfs_note): Constify. * proc-events.c (struct trans, syscall_table): * proc-flags.c (struct trans): Constify. * proc-utils.h (procfs_note): Constify. * proc-why.c (struct trans): Constify. * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error) (procfs_detach): Constify. * sol-thread.c (struct string_map): Constify. (td_err_string, td_state_string): Constify.
Diffstat (limited to 'gdb/sol-thread.c')
-rw-r--r--gdb/sol-thread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index 39dae86..02515b2 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -86,7 +86,7 @@ struct ps_prochandle
struct string_map
{
int num;
- char *str;
+ const char *str;
};
static struct ps_prochandle main_ph;
@@ -179,7 +179,7 @@ static td_thr_setgregs_ftype *p_td_thr_setgregs;
/* Return the libthread_db error string associated with ERRCODE. If
ERRCODE is unknown, return an appropriate message. */
-static char *
+static const char *
td_err_string (td_err_e errcode)
{
static struct string_map td_err_table[] =
@@ -223,7 +223,7 @@ td_err_string (td_err_e errcode)
/* Return the libthread_db state string assicoated with STATECODE.
If STATECODE is unknown, return an appropriate message. */
-static char *
+static const char *
td_state_string (td_thr_state_e statecode)
{
static struct string_map td_thr_state_table[] =