[core,libyuv,modules] Fix function declarations without a prototype

This commit is contained in:
Jakub Karolczyk 2023-07-04 09:51:37 +01:00
parent b355bf21e6
commit a160eced99
25 changed files with 41 additions and 41 deletions

View File

@ -582,7 +582,7 @@ typedef void (*ARGBBlendRow)(const uint8_t* src_argb0,
// Get function to Alpha Blend ARGB pixels and store to destination. // Get function to Alpha Blend ARGB pixels and store to destination.
LIBYUV_API LIBYUV_API
ARGBBlendRow GetARGBBlend(); ARGBBlendRow GetARGBBlend(void);
// Alpha Blend ARGB images and store to destination. // Alpha Blend ARGB images and store to destination.
// Source is pre-multiplied by alpha using ARGBAttenuate. // Source is pre-multiplied by alpha using ARGBAttenuate.

View File

@ -1185,7 +1185,7 @@ int ARGBMirror(const uint8_t* src_argb,
// As there are 6 blenders to choose from, the caller should try to use // As there are 6 blenders to choose from, the caller should try to use
// the same blend function for all pixels if possible. // the same blend function for all pixels if possible.
LIBYUV_API LIBYUV_API
ARGBBlendRow GetARGBBlend() { ARGBBlendRow GetARGBBlend(void) {
void (*ARGBBlendRow)(const uint8_t* src_argb, const uint8_t* src_argb1, void (*ARGBBlendRow)(const uint8_t* src_argb, const uint8_t* src_argb1,
uint8_t* dst_argb, int width) = ARGBBlendRow_C; uint8_t* dst_argb, int width) = ARGBBlendRow_C;
#if defined(HAS_ARGBBLENDROW_SSSE3) #if defined(HAS_ARGBBLENDROW_SSSE3)

View File

@ -46,7 +46,7 @@
#pragma warning (disable:167) #pragma warning (disable:167)
#endif #endif
static void fs_encode_cleanup() static void fs_encode_cleanup(void)
{ {
switch_safe_free(SWITCH_GLOBAL_dirs.conf_dir); switch_safe_free(SWITCH_GLOBAL_dirs.conf_dir);
switch_safe_free(SWITCH_GLOBAL_dirs.mod_dir); switch_safe_free(SWITCH_GLOBAL_dirs.mod_dir);

View File

@ -46,7 +46,7 @@
#pragma warning (disable:167) #pragma warning (disable:167)
#endif #endif
static void fs_tts_cleanup() static void fs_tts_cleanup(void)
{ {
switch_safe_free(SWITCH_GLOBAL_dirs.conf_dir); switch_safe_free(SWITCH_GLOBAL_dirs.conf_dir);
switch_safe_free(SWITCH_GLOBAL_dirs.mod_dir); switch_safe_free(SWITCH_GLOBAL_dirs.mod_dir);

View File

@ -2208,7 +2208,7 @@ static void parse_codecs(avcodec_profile_t *aprofile, switch_xml_t codecs)
} }
static void load_config() static void load_config(void)
{ {
switch_xml_t cfg = NULL, xml = NULL; switch_xml_t cfg = NULL, xml = NULL;

View File

@ -2861,7 +2861,7 @@ static char *supported_formats[SWITCH_MAX_CODECS] = { 0 };
static const char modname[] = "mod_av"; static const char modname[] = "mod_av";
static switch_status_t load_config() static switch_status_t load_config(void)
{ {
char *cf = "avformat.conf"; char *cf = "avformat.conf";
switch_xml_t cfg, xml, param, settings; switch_xml_t cfg, xml, param, settings;

View File

@ -75,7 +75,7 @@ struct _mapping control_mappings[] = {
{"deaf off", conference_loop_deaf_off} {"deaf off", conference_loop_deaf_off}
}; };
int conference_loop_mapping_len() int conference_loop_mapping_len(void)
{ {
return (sizeof(control_mappings)/sizeof(control_mappings[0])); return (sizeof(control_mappings)/sizeof(control_mappings[0]));
} }

View File

@ -1124,7 +1124,7 @@ void conference_video_canvas_del_fnode_layer(conference_obj_t *conference, confe
void conference_video_canvas_set_fnode_layer(mcu_canvas_t *canvas, conference_file_node_t *fnode, int idx); void conference_video_canvas_set_fnode_layer(mcu_canvas_t *canvas, conference_file_node_t *fnode, int idx);
void conference_list(conference_obj_t *conference, switch_stream_handle_t *stream, char *delim); void conference_list(conference_obj_t *conference, switch_stream_handle_t *stream, char *delim);
const char *conference_utils_combine_flag_var(switch_core_session_t *session, const char *var_name); const char *conference_utils_combine_flag_var(switch_core_session_t *session, const char *var_name);
int conference_loop_mapping_len(); int conference_loop_mapping_len(void);
void conference_api_set_agc(conference_member_t *member, const char *data); void conference_api_set_agc(conference_member_t *member, const char *data);
switch_status_t conference_outcall(conference_obj_t *conference, switch_status_t conference_outcall(conference_obj_t *conference,

View File

@ -280,7 +280,7 @@ static switch_xml_config_item_t config_settings[] = {
SWITCH_CONFIG_ITEM_END() SWITCH_CONFIG_ITEM_END()
}; };
static switch_status_t do_config() static switch_status_t do_config(void)
{ {
switch_cache_db_handle_t *dbh = NULL; switch_cache_db_handle_t *dbh = NULL;
switch_status_t status = SWITCH_STATUS_SUCCESS; switch_status_t status = SWITCH_STATUS_SUCCESS;

View File

@ -704,7 +704,7 @@ done:
return status; return status;
} }
static switch_status_t load_config() static switch_status_t load_config(void)
{ {
char *cf = "signalwire.conf"; char *cf = "signalwire.conf";
switch_xml_t cfg, xml; switch_xml_t cfg, xml;
@ -1390,7 +1390,7 @@ static void mod_signalwire_state_register(void)
} }
} }
static void mod_signalwire_state_ready() static void mod_signalwire_state_ready(void)
{ {
if (globals.profile_update) { if (globals.profile_update) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Signalwire SIP profile update initiated\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Signalwire SIP profile update initiated\n");

View File

@ -2136,7 +2136,7 @@ void launch_skinny_profile_thread(skinny_profile_t *profile) {
/*****************************************************************************/ /*****************************************************************************/
/* MODULE FUNCTIONS */ /* MODULE FUNCTIONS */
/*****************************************************************************/ /*****************************************************************************/
switch_endpoint_interface_t *skinny_get_endpoint_interface() switch_endpoint_interface_t *skinny_get_endpoint_interface(void)
{ {
return skinny_endpoint_interface; return skinny_endpoint_interface;
} }

View File

@ -355,7 +355,7 @@ switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
/*****************************************************************************/ /*****************************************************************************/
/* MODULE FUNCTIONS */ /* MODULE FUNCTIONS */
/*****************************************************************************/ /*****************************************************************************/
switch_endpoint_interface_t *skinny_get_endpoint_interface(); switch_endpoint_interface_t *skinny_get_endpoint_interface(void);
/*****************************************************************************/ /*****************************************************************************/
/* TEXT FUNCTIONS */ /* TEXT FUNCTIONS */

View File

@ -697,7 +697,7 @@ switch_status_t skinny_api_register(switch_loadable_module_interface_t **module_
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
switch_status_t skinny_api_unregister() switch_status_t skinny_api_unregister(void)
{ {
switch_console_set_complete("del skinny"); switch_console_set_complete("del skinny");

View File

@ -34,7 +34,7 @@
#define _SKINNY_API_H #define _SKINNY_API_H
switch_status_t skinny_api_register(switch_loadable_module_interface_t **module_interface); switch_status_t skinny_api_register(switch_loadable_module_interface_t **module_interface);
switch_status_t skinny_api_unregister(); switch_status_t skinny_api_unregister(void);
#endif /* _SKINNY_API_H */ #endif /* _SKINNY_API_H */

View File

@ -54,7 +54,7 @@ switch_endpoint_interface_t *sofia_endpoint_interface;
#define STRLEN 15 #define STRLEN 15
void mod_sofia_shutdown_cleanup(); void mod_sofia_shutdown_cleanup(void);
static switch_status_t sofia_on_init(switch_core_session_t *session); static switch_status_t sofia_on_init(switch_core_session_t *session);
static switch_status_t sofia_on_exchange_media(switch_core_session_t *session); static switch_status_t sofia_on_exchange_media(switch_core_session_t *session);
@ -6833,7 +6833,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load)
return status; return status;
} }
void mod_sofia_shutdown_cleanup() { void mod_sofia_shutdown_cleanup(void) {
int sanity = 0; int sanity = 0;
int i; int i;
switch_status_t st; switch_status_t st;

View File

@ -90,7 +90,7 @@ static const char *test_wait_for_chan_var(switch_channel_t *channel, const char
return var; return var;
} }
static switch_bool_t has_ipv6() static switch_bool_t has_ipv6(void)
{ {
switch_stream_handle_t stream = { 0 }; switch_stream_handle_t stream = { 0 };
SWITCH_STANDARD_STREAM(stream); SWITCH_STANDARD_STREAM(stream);
@ -110,7 +110,7 @@ static switch_bool_t has_ipv6()
return SWITCH_TRUE; return SWITCH_TRUE;
} }
static void register_gw() static void register_gw(void)
{ {
switch_stream_handle_t stream = { 0 }; switch_stream_handle_t stream = { 0 };
SWITCH_STANDARD_STREAM(stream); SWITCH_STANDARD_STREAM(stream);
@ -118,7 +118,7 @@ static void register_gw()
switch_safe_free(stream.data); switch_safe_free(stream.data);
} }
static void unregister_gw() static void unregister_gw(void)
{ {
switch_stream_handle_t stream = { 0 }; switch_stream_handle_t stream = { 0 };
SWITCH_STANDARD_STREAM(stream); SWITCH_STANDARD_STREAM(stream);

View File

@ -272,7 +272,7 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
} }
static void do_rotate_all() static void do_rotate_all(void)
{ {
switch_hash_index_t *hi; switch_hash_index_t *hi;
void *val; void *val;
@ -294,7 +294,7 @@ static void do_rotate_all()
} }
static void do_teardown() static void do_teardown(void)
{ {
switch_hash_index_t *hi; switch_hash_index_t *hi;
void *val; void *val;

View File

@ -88,7 +88,7 @@ static size_t httpCallBack(char *buffer, size_t size, size_t nitems, void *outst
return size * nitems; return size * nitems;
} }
static switch_status_t set_xml_cdr_log_dirs() static switch_status_t set_xml_cdr_log_dirs(void)
{ {
switch_time_exp_t tm; switch_time_exp_t tm;
char *path = NULL; char *path = NULL;

View File

@ -101,7 +101,7 @@ static void handle_SIGTERM(int sig)
} }
/* kill a freeswitch process running in background mode */ /* kill a freeswitch process running in background mode */
static int freeswitch_kill_background() static int freeswitch_kill_background(void)
{ {
FILE *f; /* FILE handle to open the pid file */ FILE *f; /* FILE handle to open the pid file */
char path[PATH_MAX] = ""; /* full path of the PID file */ char path[PATH_MAX] = ""; /* full path of the PID file */

View File

@ -3566,7 +3566,7 @@ SWITCH_DECLARE(int) switch_stream_system(const char *cmd, switch_stream_handle_t
} }
} }
SWITCH_DECLARE(uint16_t) switch_core_get_rtp_port_range_start_port() SWITCH_DECLARE(uint16_t) switch_core_get_rtp_port_range_start_port(void)
{ {
uint16_t start_port = 0; uint16_t start_port = 0;
@ -3577,7 +3577,7 @@ SWITCH_DECLARE(uint16_t) switch_core_get_rtp_port_range_start_port()
return start_port; return start_port;
} }
SWITCH_DECLARE(uint16_t) switch_core_get_rtp_port_range_end_port() SWITCH_DECLARE(uint16_t) switch_core_get_rtp_port_range_end_port(void)
{ {
uint16_t end_port = 0; uint16_t end_port = 0;

View File

@ -246,7 +246,7 @@ SWITCH_DECLARE(cJSON *) switch_log_node_to_json(const switch_log_node_t *node, i
return json; return json;
} }
static switch_log_node_t *switch_log_node_alloc() static switch_log_node_t *switch_log_node_alloc(void)
{ {
switch_log_node_t *node = NULL; switch_log_node_t *node = NULL;
#ifdef SWITCH_LOG_RECYCLE #ifdef SWITCH_LOG_RECYCLE

View File

@ -99,7 +99,7 @@ static switch_bool_t msrp_check_success_report(switch_msrp_msg_t *msrp_msg)
return (msrp_h_success_report && !strcmp(msrp_h_success_report, "yes")); return (msrp_h_success_report && !strcmp(msrp_h_success_report, "yes"));
} }
static void msrp_deinit_ssl() static void msrp_deinit_ssl(void)
{ {
globals.ssl_ready = 0; globals.ssl_ready = 0;
if (globals.ssl_ctx) { if (globals.ssl_ctx) {
@ -112,7 +112,7 @@ static void msrp_deinit_ssl()
} }
} }
static void msrp_init_ssl() static void msrp_init_ssl(void)
{ {
const char *err = ""; const char *err = "";
@ -187,7 +187,7 @@ static void msrp_init_ssl()
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ip, globals.ip); SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ip, globals.ip);
static switch_status_t load_config() static switch_status_t load_config(void)
{ {
char *cf = "msrp.conf"; char *cf = "msrp.conf";
switch_xml_t cfg, xml = NULL, settings, param; switch_xml_t cfg, xml = NULL, settings, param;
@ -286,12 +286,12 @@ sock_fail:
return rv; return rv;
} }
SWITCH_DECLARE(const char *) switch_msrp_listen_ip() SWITCH_DECLARE(const char *) switch_msrp_listen_ip(void)
{ {
return globals.ip; return globals.ip;
} }
SWITCH_DECLARE(switch_status_t) switch_msrp_init() SWITCH_DECLARE(switch_status_t) switch_msrp_init(void)
{ {
switch_memory_pool_t *pool; switch_memory_pool_t *pool;
switch_thread_t *thread; switch_thread_t *thread;
@ -346,7 +346,7 @@ SWITCH_DECLARE(switch_status_t) switch_msrp_init()
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
SWITCH_DECLARE(switch_status_t) switch_msrp_destroy() SWITCH_DECLARE(switch_status_t) switch_msrp_destroy(void)
{ {
switch_status_t st = SWITCH_STATUS_SUCCESS; switch_status_t st = SWITCH_STATUS_SUCCESS;
switch_socket_t *sock; switch_socket_t *sock;
@ -1622,7 +1622,7 @@ SWITCH_DECLARE (switch_status_t) switch_msrp_perform_send(switch_msrp_session_t
return status; return status;
} }
SWITCH_DECLARE(switch_msrp_msg_t *) switch_msrp_msg_create() SWITCH_DECLARE(switch_msrp_msg_t *) switch_msrp_msg_create(void)
{ {
switch_msrp_msg_t *msg = malloc(sizeof(switch_msrp_msg_t)); switch_msrp_msg_t *msg = malloc(sizeof(switch_msrp_msg_t));
switch_assert(msg); switch_assert(msg);

View File

@ -262,8 +262,8 @@ typedef struct {
struct switch_rtp; struct switch_rtp;
static void switch_rtp_dtls_init(); static void switch_rtp_dtls_init(void);
static void switch_rtp_dtls_destroy(); static void switch_rtp_dtls_destroy(void);
#define MAX_DTLS_MTU 4096 #define MAX_DTLS_MTU 4096
@ -1660,7 +1660,7 @@ static void rtcp_generate_sender_info(switch_rtp_t *rtp_session, struct switch_r
); );
} }
static inline uint32_t calc_local_lsr_now() static inline uint32_t calc_local_lsr_now(void)
{ {
switch_time_t now; switch_time_t now;
uint32_t ntp_sec, ntp_usec, lsr_now, sec; uint32_t ntp_sec, ntp_usec, lsr_now, sec;
@ -3493,7 +3493,7 @@ static BIO_METHOD dtls_bio_filter_methods = {
static BIO_METHOD *dtls_bio_filter_methods = NULL; static BIO_METHOD *dtls_bio_filter_methods = NULL;
#endif #endif
static void switch_rtp_dtls_init() { static void switch_rtp_dtls_init(void) {
#if OPENSSL_VERSION_NUMBER >= 0x10100000L #if OPENSSL_VERSION_NUMBER >= 0x10100000L
dtls_bio_filter_methods = BIO_meth_new(BIO_TYPE_FILTER | BIO_get_new_index(), "DTLS filter"); dtls_bio_filter_methods = BIO_meth_new(BIO_TYPE_FILTER | BIO_get_new_index(), "DTLS filter");
BIO_meth_set_write(dtls_bio_filter_methods, dtls_bio_filter_write); BIO_meth_set_write(dtls_bio_filter_methods, dtls_bio_filter_write);
@ -3503,7 +3503,7 @@ static void switch_rtp_dtls_init() {
#endif #endif
} }
static void switch_rtp_dtls_destroy() { static void switch_rtp_dtls_destroy(void) {
#if OPENSSL_VERSION_NUMBER >= 0x10100000L #if OPENSSL_VERSION_NUMBER >= 0x10100000L
if (dtls_bio_filter_methods) { if (dtls_bio_filter_methods) {
BIO_meth_free(dtls_bio_filter_methods); BIO_meth_free(dtls_bio_filter_methods);

View File

@ -470,7 +470,7 @@ static switch_status_t switch_speex_destroy(switch_codec_t *codec)
/** /**
* read default settings from speex.conf * read default settings from speex.conf
*/ */
static void load_configuration() static void load_configuration(void)
{ {
switch_xml_t xml = NULL, cfg = NULL; switch_xml_t xml = NULL, cfg = NULL;

View File

@ -1853,7 +1853,7 @@ static void parse_codecs(my_vpx_cfg_t *my_cfg, switch_xml_t codecs)
} }
} }
static void load_config() static void load_config(void)
{ {
switch_xml_t cfg = NULL, xml = NULL; switch_xml_t cfg = NULL, xml = NULL;
my_vpx_cfg_t *my_cfg = NULL; my_vpx_cfg_t *my_cfg = NULL;