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

@ -35,7 +35,7 @@ typedef struct {
* reference count of the underlying DOH objects.
* ----------------------------------------------------------------------------- */
static DOHList *open_files_list_instance() {
static DOHList *open_files_list_instance(void) {
static DOHList *all_open_files = 0;
if (!all_open_files)
all_open_files = DohNewList();
@ -73,7 +73,7 @@ static void open_files_list_remove(DohFile *f) {
* Close all opened files, to be called on program termination
* ----------------------------------------------------------------------------- */
void DohCloseAllOpenFiles() {
void DohCloseAllOpenFiles(void) {
int i;
DOHList *all_open_files = open_files_list_instance();
for (i = 0; i < DohLen(all_open_files); i++) {

View file

@ -48,7 +48,7 @@ static int pools_initialized = 0;
* CreatePool() - Create a new memory pool
* ---------------------------------------------------------------------- */
static void CreatePool() {
static void CreatePool(void) {
Pool *p = 0;
p = (Pool *) DohMalloc(sizeof(Pool));
p->ptr = (DohBase *) DohCalloc(PoolSize, sizeof(DohBase));
@ -65,7 +65,7 @@ static void CreatePool() {
* InitPools() - Initialize the memory allocator
* ---------------------------------------------------------------------- */
static void InitPools() {
static void InitPools(void) {
if (pools_initialized)
return;
CreatePool(); /* Create initial pool */