Resolve -Wstrict-prototypes warnings with clang-15

warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
This commit is contained in:
Olly Betts 2022-06-30 12:36:45 +12:00
commit 6c4010e442
15 changed files with 34 additions and 34 deletions

View file

@ -145,7 +145,7 @@ static List *Swig_search_path_any(int syspath) {
return slist;
}
List *Swig_search_path() {
List *Swig_search_path(void) {
return Swig_search_path_any(0);
}
@ -376,6 +376,6 @@ String *Swig_file_dirname(const_String_or_char_ptr filename) {
/*
* Swig_file_debug()
*/
void Swig_file_debug_set() {
void Swig_file_debug_set(void) {
file_debug = 1;
}

View file

@ -1497,7 +1497,7 @@ int Swig_is_generated_overload(Node *n) {
* Initialize the SWIG core
* ----------------------------------------------------------------------------- */
void Swig_init() {
void Swig_init(void) {
/* Set some useful string encoding methods */
DohEncoding("escape", Swig_string_escape);
DohEncoding("hexescape", Swig_string_hexescape);

View file

@ -744,28 +744,28 @@ void Swig_feature_set(Hash *features, const_String_or_char_ptr name, SwigType *d
* ----------------------------------------------------------------------------- */
static Hash *namewarn_hash = 0;
static Hash *name_namewarn_hash() {
static Hash *name_namewarn_hash(void) {
if (!namewarn_hash)
namewarn_hash = NewHash();
return namewarn_hash;
}
static Hash *rename_hash = 0;
static Hash *name_rename_hash() {
static Hash *name_rename_hash(void) {
if (!rename_hash)
rename_hash = NewHash();
return rename_hash;
}
static List *namewarn_list = 0;
static List *name_namewarn_list() {
static List *name_namewarn_list(void) {
if (!namewarn_list)
namewarn_list = NewList();
return namewarn_list;
}
static List *rename_list = 0;
static List *name_rename_list() {
static List *name_rename_list(void) {
if (!rename_list)
rename_list = NewList();
return rename_list;

View file

@ -149,7 +149,7 @@ int ParmList_len(ParmList *p) {
* get_empty_type()
* ---------------------------------------------------------------------- */
static SwigType *get_empty_type() {
static SwigType *get_empty_type(void) {
return NewStringEmpty();
}

View file

@ -30,7 +30,7 @@ extern String *Swig_file_extension(const_String_or_char_ptr filename);
extern String *Swig_file_basename(const_String_or_char_ptr filename);
extern String *Swig_file_filename(const_String_or_char_ptr filename);
extern String *Swig_file_dirname(const_String_or_char_ptr filename);
extern void Swig_file_debug_set();
extern void Swig_file_debug_set(void);
/* Delimiter used in accessing files and directories */

View file

@ -151,7 +151,7 @@ static void set_typemap(const SwigType *type, Hash **tmhash) {
* Initialize the typemap system
* ----------------------------------------------------------------------------- */
void Swig_typemap_init() {
void Swig_typemap_init(void) {
typemaps = NewHash();
}
@ -2170,7 +2170,7 @@ static void replace_embedded_typemap(String *s, ParmList *parm_sublist, Wrapper
* Display all typemaps
* ----------------------------------------------------------------------------- */
void Swig_typemap_debug() {
void Swig_typemap_debug(void) {
int nesting_level = 2;
Printf(stdout, "---[ typemaps ]--------------------------------------------------------------\n");
Swig_print(typemaps, nesting_level);

View file

@ -180,7 +180,7 @@ int Swig_value_wrapper_mode(int mode) {
}
static void flush_cache() {
static void flush_cache(void) {
typedef_resolve_cache = 0;
typedef_all_cache = 0;
typedef_qualified_cache = 0;
@ -188,7 +188,7 @@ static void flush_cache() {
/* Initialize the scoping system */
void SwigType_typesystem_init() {
void SwigType_typesystem_init(void) {
if (global_scope)
Delete(global_scope);
if (scopes)
@ -407,7 +407,7 @@ void SwigType_using_scope(Typetab *scope) {
* table for the scope that was popped off.
* ----------------------------------------------------------------------------- */
Typetab *SwigType_pop_scope() {
Typetab *SwigType_pop_scope(void) {
Typetab *t, *old = current_scope;
t = Getattr(current_scope, "parent");
if (!t)
@ -2093,7 +2093,7 @@ static int SwigType_compare_mangled(const DOH *a, const DOH *b) {
* Returns the sorted list of mangled type names that should be exported into the
* wrapper file.
* ----------------------------------------------------------------------------- */
List *SwigType_get_sorted_mangled_list() {
List *SwigType_get_sorted_mangled_list(void) {
List *l = Keys(r_mangled);
SortList(l, SwigType_compare_mangled);
return l;