aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-08-09 12:38:39 -0600
committerTom Tromey <tom@tromey.com>2018-08-27 12:00:09 -0600
commit896a7aa6a119ce9d4872de87dabb81176489b1a3 (patch)
tree9e71c7fa2905b25b2a118b3fb8840cb2e6cba738 /gdb/completer.c
parentFix indentation in solist.h (diff)
downloadbinutils-gdb-896a7aa6a119ce9d4872de87dabb81176489b1a3.tar.gz
binutils-gdb-896a7aa6a119ce9d4872de87dabb81176489b1a3.tar.bz2
binutils-gdb-896a7aa6a119ce9d4872de87dabb81176489b1a3.zip
Avoid -Wnarrowing warnings from quote_char()
This adds a couple of casts to avoid -Wnarrowing warnings coming from the use of quote_char(). gdb/ChangeLog 2018-08-27 Tom Tromey <tom@tromey.com> * linespec.c (complete_linespec_component): Add cast to "char". * completer.c (completion_tracker::build_completion_result): Add cast to "char".
Diffstat (limited to 'gdb/completer.c')
-rw-r--r--gdb/completer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/completer.c b/gdb/completer.c
index 3e87ed454c6..1c285262de6 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -2032,7 +2032,7 @@ completion_tracker::build_completion_result (const char *text,
/* We don't rely on readline appending the quote char as
delimiter as then readline wouldn't append the ' ' after the
completion. */
- char buf[2] = { quote_char () };
+ char buf[2] = { (char) quote_char () };
match_list[0] = reconcat (match_list[0], match_list[0],
buf, (char *) NULL);