mirror of
https://github.com/pikvm/ustreamer.git
synced 2025-12-23 18:50:00 +00:00
using (void) instead of UNUSED
This commit is contained in:
parent
63d87f0526
commit
46e630d2f6
@ -99,7 +99,9 @@ static atomic_bool _g_key_required = false;
|
||||
janus_plugin *create(void);
|
||||
|
||||
|
||||
static void *_video_rtp_thread(UNUSED void *arg) {
|
||||
static void *_video_rtp_thread(void *arg) {
|
||||
(void)arg;
|
||||
|
||||
US_THREAD_RENAME("us_video_rtp");
|
||||
atomic_store(&_g_video_rtp_tid_created, true);
|
||||
|
||||
@ -116,7 +118,9 @@ static void *_video_rtp_thread(UNUSED void *arg) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void *_video_sink_thread(UNUSED void *arg) {
|
||||
static void *_video_sink_thread(void *arg) {
|
||||
(void)arg;
|
||||
|
||||
US_THREAD_RENAME("us_video_sink");
|
||||
atomic_store(&_g_video_sink_tid_created, true);
|
||||
|
||||
@ -178,7 +182,9 @@ static void *_video_sink_thread(UNUSED void *arg) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void *_audio_thread(UNUSED void *arg) {
|
||||
static void *_audio_thread(void *arg) {
|
||||
(void)arg;
|
||||
|
||||
US_THREAD_RENAME("us_audio");
|
||||
atomic_store(&_g_audio_tid_created, true);
|
||||
assert(_g_config->audio_dev_name != NULL);
|
||||
@ -344,7 +350,8 @@ static json_t *_plugin_query_session(janus_plugin_session *session) {
|
||||
return info;
|
||||
}
|
||||
|
||||
static void _set_transmit(janus_plugin_session *session, UNUSED const char *msg, bool transmit) {
|
||||
static void _set_transmit(janus_plugin_session *session, const char *msg, bool transmit) {
|
||||
(void)msg;
|
||||
_IF_DISABLED({ return; });
|
||||
_LOCK_ALL;
|
||||
bool found = false;
|
||||
@ -503,7 +510,9 @@ static struct janus_plugin_result *_plugin_handle_message(
|
||||
# undef FREE_MSG_JSEP
|
||||
}
|
||||
|
||||
static void _plugin_incoming_rtcp(UNUSED janus_plugin_session *handle, UNUSED janus_plugin_rtcp *packet) {
|
||||
static void _plugin_incoming_rtcp(janus_plugin_session *handle, janus_plugin_rtcp *packet) {
|
||||
(void)handle;
|
||||
(void)packet;
|
||||
if (packet->video && janus_rtcp_has_pli(packet->buffer, packet->length)) {
|
||||
// US_JLOG_INFO("main", "Got video PLI");
|
||||
atomic_store(&_g_key_required, true);
|
||||
|
||||
@ -57,7 +57,6 @@
|
||||
#define RN "\r\n"
|
||||
|
||||
#define INLINE inline __attribute__((always_inline))
|
||||
#define UNUSED __attribute__((unused))
|
||||
|
||||
#define US_CALLOC(x_dest, x_nmemb) assert(((x_dest) = calloc((x_nmemb), sizeof(*(x_dest)))) != NULL)
|
||||
#define US_REALLOC(x_dest, x_nmemb) assert(((x_dest) = realloc((x_dest), (x_nmemb) * sizeof(*(x_dest)))) != NULL)
|
||||
|
||||
@ -747,7 +747,10 @@ static void _http_callback_stream_write(struct bufferevent *buf_event, void *v_c
|
||||
# undef BOUNDARY
|
||||
}
|
||||
|
||||
static void _http_callback_stream_error(UNUSED struct bufferevent *buf_event, UNUSED short what, void *v_client) {
|
||||
static void _http_callback_stream_error(struct bufferevent *buf_event, short what, void *v_client) {
|
||||
(void)buf_event;
|
||||
(void)what;
|
||||
|
||||
us_stream_client_s *const client = (us_stream_client_s *)v_client;
|
||||
us_server_s *const server = client->server;
|
||||
|
||||
@ -825,7 +828,10 @@ static void _http_queue_send_stream(us_server_s *server, bool stream_updated, bo
|
||||
}
|
||||
}
|
||||
|
||||
static void _http_request_watcher(UNUSED int fd, UNUSED short what, void *v_server) {
|
||||
static void _http_request_watcher(int fd, short what, void *v_server) {
|
||||
(void)fd;
|
||||
(void)what;
|
||||
|
||||
us_server_s *server = (us_server_s *)v_server;
|
||||
const long double now = us_get_now_monotonic();
|
||||
|
||||
@ -839,7 +845,10 @@ static void _http_request_watcher(UNUSED int fd, UNUSED short what, void *v_serv
|
||||
}
|
||||
}
|
||||
|
||||
static void _http_refresher(UNUSED int fd, UNUSED short what, void *v_server) {
|
||||
static void _http_refresher(int fd, short what, void *v_server) {
|
||||
(void)fd;
|
||||
(void)what;
|
||||
|
||||
us_server_s *server = (us_server_s *)v_server;
|
||||
bool stream_updated = false;
|
||||
bool frame_updated = false;
|
||||
|
||||
@ -52,14 +52,16 @@ static void _block_thread_signals(void) {
|
||||
assert(!pthread_sigmask(SIG_BLOCK, &mask, NULL));
|
||||
}
|
||||
|
||||
static void *_stream_loop_thread(UNUSED void *arg) {
|
||||
static void *_stream_loop_thread(void *arg) {
|
||||
(void)arg;
|
||||
US_THREAD_RENAME("stream");
|
||||
_block_thread_signals();
|
||||
us_stream_loop(_g_stream);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void *_server_loop_thread(UNUSED void *arg) {
|
||||
static void *_server_loop_thread(void *arg) {
|
||||
(void)arg;
|
||||
US_THREAD_RENAME("http");
|
||||
_block_thread_signals();
|
||||
us_server_loop(_g_server);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user