Merge pull request #311 from luwei08/fix_clang_compile

Build sucessfully by clang with higher version.
This commit is contained in:
郑树新 2023-07-07 21:31:09 +08:00 committed by GitHub
commit 3e7dd4e73d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 28 additions and 28 deletions

View File

@ -194,7 +194,7 @@ static void mdt_avl_free(ACL_MDT *mdt)
acl_myfree(mdt_avl);
}
ACL_MDT *acl_mdt_avl_create()
ACL_MDT *acl_mdt_avl_create(void)
{
ACL_MDT_AVL *mdt;

View File

@ -123,7 +123,7 @@ static void mdt_binhash_free(ACL_MDT *mdt)
acl_myfree(mdt_bhash);
}
ACL_MDT *acl_mdt_binhash_create()
ACL_MDT *acl_mdt_binhash_create(void)
{
ACL_MDT_BHASH *mdt;

View File

@ -112,7 +112,7 @@ static void mdt_hash_free(ACL_MDT *mdt)
acl_myfree(mdt_hash);
}
ACL_MDT *acl_mdt_hash_create()
ACL_MDT *acl_mdt_hash_create(void)
{
ACL_MDT_HASH *mdt;

View File

@ -22,13 +22,13 @@
/*----------------------------------------------------------------------------*/
void zdb_init()
void zdb_init(void)
{
/* 初始化文件句柄 */
acl_fhandle_init(1000, 100, 0);
}
void zdb_end()
void zdb_end(void)
{
/* 需要关闭所有存储句柄 */
acl_fhandle_end();

View File

@ -208,7 +208,7 @@ static const ACL_TIMER_INFO *timer_iter_info(ACL_ITER *iter, struct ACL_TIMER *t
return (info);
}
ACL_TIMER *acl_timer_new()
ACL_TIMER *acl_timer_new(void)
{
ACL_TIMER *timer;

View File

@ -18,7 +18,7 @@
#include "events.h"
#include "events_fdtable.h"
ACL_EVENT_FDTABLE *event_fdtable_alloc()
ACL_EVENT_FDTABLE *event_fdtable_alloc(void)
{
ACL_EVENT_FDTABLE *fdp = acl_mycalloc(1, sizeof(ACL_EVENT_FDTABLE));
fdp->fdidx = -1;

View File

@ -132,7 +132,7 @@ static void get_main_thread_id(void)
}
#endif
unsigned long acl_main_thread_self()
unsigned long acl_main_thread_self(void)
{
#ifdef ACL_UNIX
return ((unsigned long) acl_var_main_tid);

View File

@ -331,7 +331,7 @@ static ACL_JSON_NODE *json_iter_prev(ACL_ITER *it, ACL_JSON *json)
return NULL;
}
ACL_JSON *acl_json_alloc()
ACL_JSON *acl_json_alloc(void)
{
return acl_json_dbuf_alloc(NULL);
}

View File

@ -273,17 +273,17 @@ const char *acl_aio_server_conf(void)
return __conf_file;
}
ACL_EVENT *acl_aio_server_event()
ACL_EVENT *acl_aio_server_event(void)
{
return acl_aio_event(__h_aio);
}
ACL_AIO* acl_aio_server_handle()
ACL_AIO* acl_aio_server_handle(void)
{
return __h_aio;
}
ACL_ASTREAM **acl_aio_server_streams()
ACL_ASTREAM **acl_aio_server_streams(void)
{
if (__sstreams == NULL)
acl_msg_warn("listen streams null!");

View File

@ -140,12 +140,12 @@ const char *acl_single_server_conf(void)
return __conf_file;
}
ACL_EVENT *acl_single_server_event()
ACL_EVENT *acl_single_server_event(void)
{
return __eventp;
}
ACL_VSTREAM **acl_single_server_sstreams()
ACL_VSTREAM **acl_single_server_sstreams(void)
{
return __sstreams;
}

View File

@ -135,7 +135,7 @@ const char *acl_trigger_server_conf(void)
return __conf_file;
}
ACL_EVENT *acl_trigger_server_event()
ACL_EVENT *acl_trigger_server_event(void)
{
return __eventp;
}

View File

@ -409,7 +409,7 @@ void acl_udp_server_request_timer(ACL_EVENT_NOTIFY_TIME timer_fn,
arg, delay, keep);
}
ACL_VSTREAM **acl_udp_server_streams()
ACL_VSTREAM **acl_udp_server_streams(void)
{
UDP_SERVER *server = (UDP_SERVER *) acl_pthread_getspecific(__server_key);
acl_assert(server);

View File

@ -42,7 +42,7 @@ void master_log_open(const char *procname)
}
}
void master_log_close()
void master_log_close(void)
{
if (var_master_log_opened) {
acl_msg_close();

View File

@ -248,7 +248,7 @@ char *acl_gets_nonl(char *buf, size_t size)
== ACL_VSTREAM_EOF ? NULL : buf;
}
int acl_getchar()
int acl_getchar(void)
{
return acl_vstream_getc(ACL_VSTREAM_IN);
}

View File

@ -996,7 +996,7 @@ int acl_write_to_log(const char *fmt, ...)
return ret;
}
void acl_close_log()
void acl_close_log(void)
{
ACL_LOG *log;

View File

@ -247,7 +247,7 @@ void acl_vstream_set_rbuf_size(unsigned size)
}
}
void acl_vstream_init()
void acl_vstream_init(void)
{
static int __called = 0;

View File

@ -219,7 +219,7 @@ static BTREE_NODE *btree_delete_node(ACL_BTREE *tree, BTREE_NODE *z)
/* Exported functions */
/*****************************************************************************/
ACL_BTREE *acl_btree_create()
ACL_BTREE *acl_btree_create(void)
{
ACL_BTREE *t = (ACL_BTREE*) acl_mymalloc(sizeof(ACL_BTREE));

View File

@ -462,7 +462,7 @@ static void __fhandle_close2(ACL_FHANDLE *fs)
__fhandle_free(fs);
}
void acl_fhandle_end()
void acl_fhandle_end(void)
{
const char *myname = "acl_fhandle_end";

View File

@ -288,7 +288,7 @@ void acl_mempool_ctl(int name, ...)
va_end(ap);
}
int acl_mempool_total_allocated()
int acl_mempool_total_allocated(void)
{
int n;
@ -303,7 +303,7 @@ int acl_mempool_total_allocated()
return (n);
}
void acl_mempool_status()
void acl_mempool_status(void)
{
if (__var_allocator) {
mem_pool_status(__var_allocator);

View File

@ -101,7 +101,7 @@ const char *acl_getcwd()
return (ptr);
}
#elif defined(ACL_MACOSX)
const char *acl_process_path()
const char *acl_process_path(void)
{
const char *myname = "acl_process_path";
char *buf_ptr = get_tls_buf();
@ -116,7 +116,7 @@ const char *acl_process_path()
return (buf_ptr);
}
const char *acl_getcwd()
const char *acl_getcwd(void)
{
const char *myname = "acl_getcwd";
char *buf_ptr = get_tls_buf();

View File

@ -403,7 +403,7 @@ void acl_xml_encode_enable(ACL_XML *xml, int on)
xml->flag &=~ACL_XML_FLAG_XML_ENCODE;
}
ACL_XML *acl_xml_alloc()
ACL_XML *acl_xml_alloc(void)
{
return acl_xml_dbuf_alloc(NULL);
}

View File

@ -377,7 +377,7 @@ void acl_xml3_slash(ACL_XML3 *xml, int ignore)
xml->flag &=~ACL_XML3_FLAG_IGNORE_SLASH;
}
ACL_XML3 *acl_xml3_alloc()
ACL_XML3 *acl_xml3_alloc(void)
{
return acl_xml3_dbuf_alloc(NULL);
}