mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 00:01:15 -03:00
Declare functions in headers or use internal linkage (static)
Found with gcc's -Wmissing-declarations which gives warnings like
../src/tinyexpr.cpp:61:5: warning: no previous declaration for ‘int get_arity(int)’ [-Wmissing-declarations]
61 | int get_arity(const int type) {
The same warnings show up for builtin functions like builtin_bg because they
currently don't include their own headers. I left that.
Also reformat the touched files.
This commit is contained in:
@@ -226,7 +226,7 @@ int g_fish_emoji_width = 0;
|
||||
// 1 is the typical emoji width in Unicode 8.
|
||||
int g_guessed_fish_emoji_width = 1;
|
||||
|
||||
int fish_get_emoji_width(wchar_t c) {
|
||||
static int fish_get_emoji_width(wchar_t c) {
|
||||
(void)c;
|
||||
// Respect an explicit value. If we don't have one, use the guessed value. Do not try to fall
|
||||
// back to wcwidth(), it's hopeless.
|
||||
|
||||
Reference in New Issue
Block a user