Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ci/config.mk.sed
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Werror -Wno-deprecated-declarations/
/^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Werror -Wno-deprecated-declarations/
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function -Wno-shadow/
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter/
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter -Wno-strict-prototypes/
3 changes: 3 additions & 0 deletions src/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
# include "gui_gtk_vms.h"
# endif // VMS
# include <X11/Intrinsic.h>
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wstrict-prototypes"
# include <gtk/gtk.h>
# pragma GCC diagnostic pop
#endif

#ifdef FEAT_GUI_HAIKU
Expand Down
2 changes: 1 addition & 1 deletion src/if_perl.xs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ typedef int perl_key;
*/
static HANDLE hPerlLib = NULL;

static PerlInterpreter* (*perl_alloc)();
static PerlInterpreter* (*perl_alloc)(void);
static void (*perl_construct)(PerlInterpreter*);
static void (*perl_destruct)(PerlInterpreter*);
static void (*perl_free)(PerlInterpreter*);
Expand Down
8 changes: 4 additions & 4 deletions src/if_py_both.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ struct typeobject_wrapper {
# define Py_TYPE_GET_TP_METHODS(type) ((PyMethodDef *)PyType_GetSlot(type, Py_tp_methods))

// PyObject_NEW is not part of stable ABI, but PyObject_Malloc/Init are.
PyObject* Vim_PyObject_New(PyTypeObject *type, size_t objsize)
static PyObject* Vim_PyObject_New(PyTypeObject *type, size_t objsize)
{
PyObject *obj = (PyObject *)PyObject_Malloc(objsize);
if (obj == NULL)
Expand Down Expand Up @@ -168,7 +168,7 @@ PyObject* Vim_PyObject_New(PyTypeObject *type, size_t objsize)
# define PyIter_Check(obj) (FALSE)
# endif

PyTypeObject* AddHeapType(struct typeobject_wrapper* type_object)
static PyTypeObject* AddHeapType(struct typeobject_wrapper* type_object)
{
PyType_Spec type_spec;
type_spec.name = type_object->tp_name;
Expand Down Expand Up @@ -254,7 +254,7 @@ PyTypeObject* AddHeapType(struct typeobject_wrapper* type_object)

// Limited API does not provide PyRun_* functions. Need to implement manually
// using PyCompile and PyEval.
PyObject* Vim_PyRun_String(const char *str, int start, PyObject *globals, PyObject *locals)
static PyObject* Vim_PyRun_String(const char *str, int start, PyObject *globals, PyObject *locals)
{
// Just pass "" for filename for now.
PyObject* compiled = Py_CompileString(str, "", start);
Expand All @@ -265,7 +265,7 @@ PyObject* Vim_PyRun_String(const char *str, int start, PyObject *globals, PyObje
Py_DECREF(compiled);
return eval_result;
}
int Vim_PyRun_SimpleString(const char *str)
static int Vim_PyRun_SimpleString(const char *str)
{
// This function emulates CPython's implementation.
PyObject* m = PyImport_AddModule("__main__");
Expand Down
6 changes: 3 additions & 3 deletions src/if_python3.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ static int (*py3_PyObject_SetAttrString)(PyObject *, const char *, PyObject *);
static PyObject* (*py3_PyObject_CallFunctionObjArgs)(PyObject *, ...);
static PyObject* (*py3__PyObject_CallFunction_SizeT)(PyObject *, char *, ...);
static PyObject* (*py3_PyObject_Call)(PyObject *, PyObject *, PyObject *);
static PyObject* (*py3_PyEval_GetGlobals)();
static PyObject* (*py3_PyEval_GetLocals)();
static PyObject* (*py3_PyEval_GetGlobals)(void);
static PyObject* (*py3_PyEval_GetLocals)(void);
static PyObject* (*py3_PyList_GetItem)(PyObject *, Py_ssize_t);
static PyObject* (*py3_PyImport_ImportModule)(const char *);
static PyObject* (*py3_PyImport_AddModule)(const char *);
Expand Down Expand Up @@ -1061,7 +1061,7 @@ static struct PyModuleDef vimmodule;
// An alternative would be to convert all attribute string comparisons to use
// PyUnicode_CompareWithASCIIString to skip having to extract the chars.
static char py3_unicode_utf8_chars[20];
char* PY_UNICODE_GET_UTF8_CHARS(PyObject* str)
static char* PY_UNICODE_GET_UTF8_CHARS(PyObject* str)
{
py3_unicode_utf8_chars[0] = '\0';
PyObject* bytes = PyUnicode_AsUTF8String(str);
Expand Down
2 changes: 1 addition & 1 deletion src/if_tcl.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ typedef int HANDLE;
* Declare HANDLE for tcl.dll and function pointers.
*/
static HANDLE hTclLib = NULL;
Tcl_Interp* (*dll_Tcl_CreateInterp)();
Tcl_Interp* (*dll_Tcl_CreateInterp)(void);
void (*dll_Tcl_FindExecutable)(const void *);

/*
Expand Down
4 changes: 2 additions & 2 deletions src/option.c
Original file line number Diff line number Diff line change
Expand Up @@ -7518,7 +7518,7 @@ set_context_in_set_cmd(
* If 'test_only' is FALSE and 'fuzzy' is TRUE and if 'str' fuzzy matches
* 'fuzzystr', then stores the match details in fuzmatch[idx] and returns TRUE.
*/
int
static int
match_str(
char_u *str,
regmatch_T *regmatch,
Expand Down Expand Up @@ -8014,7 +8014,7 @@ ExpandSettingSubtract(
// character as individual choice.
for (char_u *flag = option_val; *flag != NUL; flag++)
{
char_u *p = vim_strnsave(flag, 1);
p = vim_strnsave(flag, 1);
if (p == NULL)
break;
(*matches)[count++] = p;
Expand Down
6 changes: 3 additions & 3 deletions src/optionstr.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ did_set_option_listflag(char_u *val, char_u *flags, char *errbuf)
/*
* Expand an option that accepts a list of string values.
*/
int
static int
expand_set_opt_string(
optexpand_T *args,
char **values,
Expand Down Expand Up @@ -819,7 +819,7 @@ expand_set_opt_callback(expand_T *xp, int idx)
/*
* Expand an option with a callback that iterates through a list of possible names.
*/
int
static int
expand_set_opt_generic(
optexpand_T *args,
char_u *((*func)(expand_T *, int)),
Expand Down Expand Up @@ -850,7 +850,7 @@ expand_set_opt_generic(
/*
* Expand an option which is a list of flags.
*/
int
static int
expand_set_opt_listflag(
optexpand_T *args,
char_u *flags,
Expand Down