mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 23:11:14 -03:00
eliminate warnings in auxiliary programs
Partially addresses issue #3430.
This commit is contained in:
@@ -84,7 +84,9 @@ static void dump_node(indent_t node_indent, const parse_node_t &node, const wcst
|
||||
wcstring source_txt = L"";
|
||||
if (node.source_start != SOURCE_OFFSET_INVALID && node.source_length != SOURCE_OFFSET_INVALID) {
|
||||
int nextc_idx = node.source_start + node.source_length;
|
||||
if (nextc_idx < source.size()) nextc = source[node.source_start + node.source_length];
|
||||
if ((size_t)nextc_idx < source.size()) {
|
||||
nextc = source[node.source_start + node.source_length];
|
||||
}
|
||||
if (node.source_start > 0) prevc = source[node.source_start - 1];
|
||||
source_txt = source.substr(node.source_start, node.source_length);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ static bool should_exit(wchar_t wc) {
|
||||
}
|
||||
|
||||
/// Return the name if the recent sequence of characters matches a known terminfo sequence.
|
||||
static char *const sequence_name(wchar_t wc) {
|
||||
static char *sequence_name(wchar_t wc) {
|
||||
unsigned char c = wc < 0x80 ? wc : 0;
|
||||
static char recent_chars[8] = {0};
|
||||
|
||||
@@ -157,7 +157,7 @@ static void add_char_to_bind_command(wchar_t wc, std::vector<wchar_t> &bind_char
|
||||
static void output_bind_command(std::vector<wchar_t> &bind_chars) {
|
||||
if (bind_chars.size()) {
|
||||
fputs("bind ", stdout);
|
||||
for (int i = 0; i < bind_chars.size(); i++) {
|
||||
for (size_t i = 0; i < bind_chars.size(); i++) {
|
||||
fputs(char_to_symbol(bind_chars[i], true), stdout);
|
||||
}
|
||||
fputs(" 'do something'\n", stdout);
|
||||
|
||||
Reference in New Issue
Block a user