From 6a37b9b32b204a6cfdf2642312c5d416086b10bd Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Fri, 4 Jul 2014 03:21:16 +0200 Subject: Provide complete C prototypes for C-exported functions A C function declaration with an empty parameter list does not declare a function taking no parameters, but simply does not declares what parameters it takes (hence, it's not a complete prototype). To denote an empty parameter list, C uses the special `void` value. This avoids warnings when building C sources including Scintilla.h if using e.g. GCC's `-Wstrict-prototypes` option, as well as actually disallowing passing parameters to those functions. --- include/Scintilla.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/Scintilla.h b/include/Scintilla.h index 93992e28f..21d5a07a9 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -18,9 +18,9 @@ extern "C" { #if defined(_WIN32) /* Return false on failure: */ int Scintilla_RegisterClasses(void *hInstance); -int Scintilla_ReleaseResources(); +int Scintilla_ReleaseResources(void); #endif -int Scintilla_LinkLexers(); +int Scintilla_LinkLexers(void); #ifdef __cplusplus } -- cgit v1.2.3