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:
Johannes Altmanninger
2020-09-08 22:04:44 +02:00
parent 7a4fece445
commit fbaa5d193d
16 changed files with 50 additions and 48 deletions

View File

@@ -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.