diff options
| author | Andrew Burgess <aburgess@redhat.com> | 2025-12-05 14:15:11 +0000 |
|---|---|---|
| committer | Andrew Burgess <aburgess@redhat.com> | 2025-12-05 14:23:30 +0000 |
| commit | 36a4bbcec4b31ff7a5fb8e5a2e20acef9344c810 (patch) | |
| tree | 031916146a6d4f42803982611816a1e756febec9 /gdb/contrib/check-whitespace-pre-commit.py | |
| parent | 71458a6da11f8afe3f39b47656d9fe5237561c26 (diff) | |
| download | binutils-36a4bbcec4b31ff7a5fb8e5a2e20acef9344c810.zip binutils-36a4bbcec4b31ff7a5fb8e5a2e20acef9344c810.tar.gz binutils-36a4bbcec4b31ff7a5fb8e5a2e20acef9344c810.tar.bz2 | |
sim: make local variable 'const'
This build error was reported to me off list:
common/callback.c:993:13: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
993 | char *q = strchr (m, ',');
| ^ ~~~~~~~~~~~~~~~
This is because with C23, strchr returns 'const char *' if a 'const
char *' is passed as an argument.
In this case M is 'const char *', so Q should also be 'const char *'.
And indeed, we don't write via Q at any time, so lets make it 'const'.
There should be no user visible changes after this commit.
Diffstat (limited to 'gdb/contrib/check-whitespace-pre-commit.py')
0 files changed, 0 insertions, 0 deletions
