Skip to content
Snippets Groups Projects
Commit 61c87ba1 authored by Sergio Ammirata's avatar Sergio Ammirata
Browse files

cleanup all compile warnings

parent 41b504c1
No related branches found
No related tags found
1 merge request!270Add udp2udp application to the project
Pipeline #548172 passed with stages
in 1 minute and 34 seconds
......@@ -134,6 +134,7 @@ static void input_udp_recv(struct evsocket_ctx *evctx, int fd, short revents, vo
struct udpheader udphdr;
size_t ipheader_bytes = sizeof(ipv4hdr) + sizeof(udphdr);
socklen_t addrlen = 0;
RIST_MARK_UNUSED(addr);
uint16_t address_family = (uint16_t)callback_object->udp_config->address_family;
if (address_family == AF_INET6) {
......@@ -152,6 +153,7 @@ static void input_udp_recv(struct evsocket_ctx *evctx, int fd, short revents, vo
if (!callback_object->output_udp_config[i])
continue;
struct rist_udp_config *udp_config = callback_object->output_udp_config[i];
RIST_MARK_UNUSED(udp_config);
if (callback_object->out_sd[i] > 0) {
int ret = udpsocket_send(callback_object->out_sd[i], recv_buf, recv_bufsize);
if (ret <= 0 && errno != ECONNREFUSED)
......@@ -207,6 +209,7 @@ int main(int argc, char *argv[])
pthread_t thread_main_loop = { 0 };
rist_tools_config_object *yaml_config = NULL;
char *yamlfile = NULL;
unsigned i = 0;
event = NULL;
......@@ -348,7 +351,7 @@ int main(int argc, char *argv[])
}
#endif
for (size_t i = 0; i < MAX_OUTPUT_COUNT; i++)
for (i = 0; i < MAX_OUTPUT_COUNT; i++)
{
callback_object.out_sd[i] = 0;
callback_object.output_udp_config[i] = NULL;
......@@ -405,7 +408,7 @@ int main(int argc, char *argv[])
atleast_one_socket_opened = false;
char *saveptr2;
char *outputtoken = strtok_r(outputurl, ",", &saveptr2);
for (size_t i = 0; i < MAX_OUTPUT_COUNT; i++) {
for (i = 0; i < MAX_OUTPUT_COUNT; i++) {
if (!outputtoken)
break;
......@@ -416,7 +419,8 @@ int main(int argc, char *argv[])
goto next;
}
// Now parse the host and port
char hostname[200] = {0};
memset(&hostname, 0, sizeof(hostname));
int outputlisten;
uint16_t outputport;
if (udpsocket_parse_url((void *)output_udp_config->address, hostname, 200, &outputport, &outputlisten) || !outputport || strlen(hostname) == 0) {
......@@ -472,7 +476,7 @@ shutdown:
rist_udp_config_free2(&callback_object.udp_config);
// Cleanup for output
for (size_t i = 0; i < MAX_OUTPUT_COUNT; i++) {
for (i = 0; i < MAX_OUTPUT_COUNT; i++) {
// Free output_udp_config object
if ((void *)callback_object.output_udp_config[i])
rist_udp_config_free2(&callback_object.output_udp_config[i]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment