mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 14:58:18 +00:00
build: -Wmissing-prototypes
ref #343 Though I don't see a strong benefit, it isn't too much of a burden, and maybe avoids confusion in some cases.
This commit is contained in:
@@ -259,7 +259,8 @@ if(MSVC)
|
|||||||
add_definitions(-DWIN32)
|
add_definitions(-DWIN32)
|
||||||
else()
|
else()
|
||||||
add_definitions(-Wall -Wextra -pedantic -Wno-unused-parameter
|
add_definitions(-Wall -Wextra -pedantic -Wno-unused-parameter
|
||||||
-Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion)
|
-Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion
|
||||||
|
-Wmissing-prototypes)
|
||||||
|
|
||||||
check_c_compiler_flag(-Wimplicit-fallthrough HAS_WIMPLICIT_FALLTHROUGH_FLAG)
|
check_c_compiler_flag(-Wimplicit-fallthrough HAS_WIMPLICIT_FALLTHROUGH_FLAG)
|
||||||
if(HAS_WIMPLICIT_FALLTHROUGH_FLAG)
|
if(HAS_WIMPLICIT_FALLTHROUGH_FLAG)
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
#include "nvim/vim.h"
|
#include "nvim/vim.h"
|
||||||
#include "nvim/main.h"
|
#include "nvim/main.h"
|
||||||
#include "nvim/ui.h"
|
#include "nvim/ui.h"
|
||||||
|
#include "nvim/aucmd.h"
|
||||||
|
|
||||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||||
# include "aucmd.c.generated.h"
|
# include "aucmd.c.generated.h"
|
||||||
|
@@ -5958,6 +5958,10 @@ static int get_env_tv(char_u **arg, typval_T *rettv, int evaluate)
|
|||||||
#pragma function (floor)
|
#pragma function (floor)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// silence -Wmissing-prototypes for funcs.generated.h
|
||||||
|
const VimLFuncDef *find_internal_func_gperf(register const char *str,
|
||||||
|
register size_t len);
|
||||||
|
|
||||||
# include "funcs.generated.h"
|
# include "funcs.generated.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include "nvim/eval/typval.h"
|
#include "nvim/eval/typval.h"
|
||||||
#include "nvim/eval.h"
|
#include "nvim/eval.h"
|
||||||
|
#include "nvim/eval/decode.h"
|
||||||
#include "nvim/eval/encode.h"
|
#include "nvim/eval/encode.h"
|
||||||
#include "nvim/ascii.h"
|
#include "nvim/ascii.h"
|
||||||
#include "nvim/macros.h"
|
#include "nvim/macros.h"
|
||||||
|
@@ -448,6 +448,7 @@ for _, fn in ipairs(functions) do
|
|||||||
end
|
end
|
||||||
|
|
||||||
output:write(string.format([[
|
output:write(string.format([[
|
||||||
|
void nlua_add_api_functions(lua_State *lstate); // silence -Wmissing-prototypes
|
||||||
void nlua_add_api_functions(lua_State *lstate)
|
void nlua_add_api_functions(lua_State *lstate)
|
||||||
FUNC_ATTR_NONNULL_ALL
|
FUNC_ATTR_NONNULL_ALL
|
||||||
{
|
{
|
||||||
|
@@ -222,6 +222,7 @@ void early_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MAKE_LIB
|
#ifdef MAKE_LIB
|
||||||
|
int nvim_main(int argc, char **argv); // silence -Wmissing-prototypes
|
||||||
int nvim_main(int argc, char **argv)
|
int nvim_main(int argc, char **argv)
|
||||||
#elif defined(WIN32)
|
#elif defined(WIN32)
|
||||||
int wmain(int argc, wchar_t **argv_w) // multibyte args on Windows. #7060
|
int wmain(int argc, wchar_t **argv_w) // multibyte args on Windows. #7060
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <uv.h>
|
#include <uv.h>
|
||||||
|
|
||||||
|
#include "nvim/os/dl.h"
|
||||||
#include "nvim/os/os.h"
|
#include "nvim/os/os.h"
|
||||||
#include "nvim/memory.h"
|
#include "nvim/memory.h"
|
||||||
#include "nvim/message.h"
|
#include "nvim/message.h"
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
#ifdef HAVE_LOCALE_H
|
#ifdef HAVE_LOCALE_H
|
||||||
# include <locale.h>
|
# include <locale.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include "nvim/os/lang.h"
|
||||||
#include "nvim/os/os.h"
|
#include "nvim/os/os.h"
|
||||||
|
|
||||||
void lang_init(void)
|
void lang_init(void)
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
uv_tty_t tty;
|
uv_tty_t tty;
|
||||||
uv_tty_t tty_out;
|
uv_tty_t tty_out;
|
||||||
|
|
||||||
|
bool owns_tty(void); // silence -Wmissing-prototypes
|
||||||
bool owns_tty(void)
|
bool owns_tty(void)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
Reference in New Issue
Block a user