aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-11-14 09:22:17 -0700
committerTom Tromey <tom@tromey.com>2020-11-14 09:24:41 -0700
commit749065b7a71a877b96db280dbdc5ddf6fd259827 (patch)
treec420713c9f1a28324699e8d0ddf6da382f8326b8 /gdb
parent2c5b1849a6814a52f3e2dd7f0e1eaf6f9dcd2359 (diff)
downloadgdb-749065b7a71a877b96db280dbdc5ddf6fd259827.zip
gdb-749065b7a71a877b96db280dbdc5ddf6fd259827.tar.gz
gdb-749065b7a71a877b96db280dbdc5ddf6fd259827.tar.bz2
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 <tom@tromey.com> * opencl-lang.c (opencl_component_ref): Make "comps" const.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/opencl-lang.c4
2 files changed, 6 insertions, 2 deletions
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 <tom@tromey.com>
+
+ * opencl-lang.c (opencl_component_ref): Make "comps" const.
+
2020-11-14 Simon Marchi <simon.marchi@polymtl.ca>
* arm-tdep.c (class arm_instruction_reader) <read>: 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;