From 749065b7a71a877b96db280dbdc5ddf6fd259827 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 14 Nov 2020 09:22:17 -0700 Subject: Add use of const in opencl-lang.c I found another expression-related spot that could use constification. This patch adds it. Tested by rebuilding. gdb/ChangeLog 2020-11-14 Tom Tromey * opencl-lang.c (opencl_component_ref): Make "comps" const. --- gdb/ChangeLog | 4 ++++ gdb/opencl-lang.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 43da682..e06f59c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2020-11-14 Tom Tromey + + * opencl-lang.c (opencl_component_ref): Make "comps" const. + 2020-11-14 Simon Marchi * arm-tdep.c (class arm_instruction_reader) : Fix comment. diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c index 11032b1..e04fc54 100644 --- a/gdb/opencl-lang.c +++ b/gdb/opencl-lang.c @@ -327,8 +327,8 @@ create_value (struct gdbarch *gdbarch, struct value *val, enum noside noside, /* OpenCL vector component access. */ static struct value * -opencl_component_ref (struct expression *exp, struct value *val, char *comps, - enum noside noside) +opencl_component_ref (struct expression *exp, struct value *val, + const char *comps, enum noside noside) { LONGEST lowb, highb; int src_len; -- cgit v1.1