mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
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".
This commit is contained in:
parent
dd33d41d54
commit
896a7aa6a1
@ -1,3 +1,9 @@
|
||||
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".
|
||||
|
||||
2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
|
||||
|
||||
* solist.h (struct solist, struct target_so_ops): Fix
|
||||
|
@ -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);
|
||||
|
@ -2894,7 +2894,7 @@ complete_linespec_component (linespec_parser *parser,
|
||||
new "quote" char. */
|
||||
if (tracker.quote_char ())
|
||||
{
|
||||
char quote_char_str[2] = { tracker.quote_char () };
|
||||
char quote_char_str[2] = { (char) tracker.quote_char () };
|
||||
|
||||
fn = reconcat (fn, fn, quote_char_str, (char *) NULL);
|
||||
tracker.set_quote_char (':');
|
||||
|
Loading…
Reference in New Issue
Block a user