mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-12 21:18:53 +00:00
Remove 4 cppcheck suppressions reported unmatched.
This commit is contained in:
parent
7c6527e9cf
commit
682af2f83f
4 changed files with 1 additions and 5 deletions
|
@ -670,7 +670,7 @@ ssize_t read_loop(int fd, void *buff, size_t count);
|
|||
///
|
||||
/// will print the string 'fish: Pi = 3.141', given that debug_level is 1 or higher, and that
|
||||
/// program_name is 'fish'.
|
||||
void __attribute__((noinline)) debug(int level, const char *msg, ...);
|
||||
void __attribute__((noinline)) debug(int level, const char *msg, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
void __attribute__((noinline)) debug(int level, const wchar_t *msg, ...);
|
||||
|
||||
/// Replace special characters with backslash escape sequences. Newline is replaced with \n, etc.
|
||||
|
|
|
@ -1372,7 +1372,6 @@ void complete(const wcstring &cmd_with_subcmds, std::vector<completion_t> *out_c
|
|||
}
|
||||
}
|
||||
|
||||
// cppcheck-suppress nullPointerRedundantCheck
|
||||
if (cmd_node && cmd_node->location_in_or_at_end_of_source_range(pos)) {
|
||||
// Complete command filename.
|
||||
completer.complete_cmd(current_token, use_function, use_builtin, use_command,
|
||||
|
|
|
@ -1059,7 +1059,6 @@ class universal_notifier_shmem_poller_t : public universal_notifier_t {
|
|||
|
||||
// Read the current seed.
|
||||
this->poll();
|
||||
// cppcheck-suppress memleak // addr not really leaked
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
|
@ -127,7 +127,6 @@ const wchar_t *token_type_description(parse_token_type_t type) {
|
|||
// This leaks memory but it should never be run unless we have a bug elsewhere in the code.
|
||||
const wcstring d = format_string(L"unknown_token_type_%ld", static_cast<long>(type));
|
||||
wchar_t *d2 = new wchar_t[d.size() + 1];
|
||||
// cppcheck-suppress memleak
|
||||
return std::wcscpy(d2, d.c_str());
|
||||
}
|
||||
|
||||
|
@ -138,7 +137,6 @@ const wchar_t *keyword_description(parse_keyword_t type) {
|
|||
// This leaks memory but it should never be run unless we have a bug elsewhere in the code.
|
||||
const wcstring d = format_string(L"unknown_keyword_%ld", static_cast<long>(type));
|
||||
wchar_t *d2 = new wchar_t[d.size() + 1];
|
||||
// cppcheck-suppress memleak
|
||||
return std::wcscpy(d2, d.c_str());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue