diff --git a/common/utils/T/DOC/T/howto_new_trace.patch b/common/utils/T/DOC/T/howto_new_trace.patch index 47bbc661382f1355812b782dfbaf1b9d1a7dd3d6..86dfe5d23cf234ed655d5301d8dd1cf2ad231228 100644 --- a/common/utils/T/DOC/T/howto_new_trace.patch +++ b/common/utils/T/DOC/T/howto_new_trace.patch @@ -164,7 +164,7 @@ index 0000000000..00baf34774 + } + + /* a buffer needed to receive events from the nr-softmodem */ -+ OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; ++ OBUF ebuf = { .osize = 0, .omaxsize = 0, .obuf = NULL }; + + /* read events */ + while (1) { diff --git a/common/utils/T/tracer/enb.c b/common/utils/T/tracer/enb.c index 9a4751b67eed287cfc22bc8e95408a409fd14641..5bb1cb87e2debc3e82c9d61a8fb5cce5e2fdc5bd 100644 --- a/common/utils/T/tracer/enb.c +++ b/common/utils/T/tracer/enb.c @@ -874,7 +874,7 @@ int main(int n, char **v) if (pthread_mutex_init(&enb_data.lock, NULL)) abort(); setup_event_selector(g, database, is_on, is_on_changed, &enb_data); - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; restart: clear_remote_config(); diff --git a/common/utils/T/tracer/event.c b/common/utils/T/tracer/event.c index 41da5c082374f06b2a00c47a0693ade9be82feae..a5d04166d49d5841522805c09847f22b8dbae822 100644 --- a/common/utils/T/tracer/event.c +++ b/common/utils/T/tracer/event.c @@ -49,7 +49,7 @@ again: #endif read_error: - return (event){type: -1}; + return (event){.type = -1}; } #ifdef T_SEND_TIME diff --git a/common/utils/T/tracer/extract.c b/common/utils/T/tracer/extract.c index fe3177b74a0098f9cde309cc76b11d0c479f1caa..445b166f09b674376542a2b842b40cdfa0c45574 100644 --- a/common/utils/T/tracer/extract.c +++ b/common/utils/T/tracer/extract.c @@ -113,7 +113,7 @@ int main(int n, char **v) found = 0; - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; while (1) { event e; diff --git a/common/utils/T/tracer/extract_config.c b/common/utils/T/tracer/extract_config.c index a26c52aeda2a8ec31cf4748a0fc07a825d18a477..b908e60a83edee9c64a9e5a66c5eae6c7549e75e 100644 --- a/common/utils/T/tracer/extract_config.c +++ b/common/utils/T/tracer/extract_config.c @@ -36,7 +36,7 @@ int main(int n, char **v) in = fopen(input_filename, "r"); if (in == NULL) { perror(input_filename); abort(); } - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; while (1) { int type; diff --git a/common/utils/T/tracer/extract_input_subframe.c b/common/utils/T/tracer/extract_input_subframe.c index 78bc288df15f27677b7c56af481018b92cb205a0..c4116953db80a0fa2faecb7b217537a62857e818 100644 --- a/common/utils/T/tracer/extract_input_subframe.c +++ b/common/utils/T/tracer/extract_input_subframe.c @@ -104,7 +104,7 @@ err: fd = open(file, O_RDONLY); if (fd == -1) { perror(file); exit(1); } - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; /* get wanted frame/subframe */ while (1) { diff --git a/common/utils/T/tracer/extract_output_subframe.c b/common/utils/T/tracer/extract_output_subframe.c index 5c5abb768e2824b2e3c19560974fc837c198221f..226f6d7a2eb59815aa494347a6fd8902aee9fc55 100644 --- a/common/utils/T/tracer/extract_output_subframe.c +++ b/common/utils/T/tracer/extract_output_subframe.c @@ -101,7 +101,7 @@ err: int last_subframe = -1; int subframe_written = 0; - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; while (1) { event e; diff --git a/common/utils/T/tracer/gnb.c b/common/utils/T/tracer/gnb.c index a2953cb00d7a86f9756357db022b55a64f3a2416..22567492f8865421667c596dce58efd475e33167 100644 --- a/common/utils/T/tracer/gnb.c +++ b/common/utils/T/tracer/gnb.c @@ -265,7 +265,7 @@ int main(int n, char **v) gnb_main_gui(&eg, g, h, database, &gnb_data); - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; restart: clear_remote_config(); diff --git a/common/utils/T/tracer/hacks/dump_nack_signal.c b/common/utils/T/tracer/hacks/dump_nack_signal.c index 02825202fb14544eb3074da8fdb0dbe1c5323cf6..f50e8a761a4807efe16a910feaed60ea37b8cb05 100644 --- a/common/utils/T/tracer/hacks/dump_nack_signal.c +++ b/common/utils/T/tracer/hacks/dump_nack_signal.c @@ -85,7 +85,7 @@ int main(int n, char **v) { socket_send(socket, is_on, number_of_events * sizeof(int)) == -1) abort(); - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; char dump[10][T_BUFFER_MAX]; event dump_ev[10]; FILE *z = fopen("/tmp/dd", "w"); diff --git a/common/utils/T/tracer/hacks/multi-rru-clean.c b/common/utils/T/tracer/hacks/multi-rru-clean.c index fd94253fb0f49037b77da83afeed6350c3fccf0e..ec7c8f9d1bbae1f811e8acfc19e5925f9a228512 100644 --- a/common/utils/T/tracer/hacks/multi-rru-clean.c +++ b/common/utils/T/tracer/hacks/multi-rru-clean.c @@ -145,7 +145,7 @@ int main(int n, char **v) clear_cache(number_of_tags, cache); - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; while (1) { int type; diff --git a/common/utils/T/tracer/hacks/time_meas.c b/common/utils/T/tracer/hacks/time_meas.c index 408189cd80c210d7ce0dcf7cb17a48244336a32f..ae38dcd1772e6e28d39c13c207219455dfe09703 100644 --- a/common/utils/T/tracer/hacks/time_meas.c +++ b/common/utils/T/tracer/hacks/time_meas.c @@ -86,7 +86,7 @@ int main(int n, char **v) socket_send(socket, is_on, number_of_events * sizeof(int)) == -1) abort(); - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; while (1) { event e; diff --git a/common/utils/T/tracer/logger/textlog.c b/common/utils/T/tracer/logger/textlog.c index 76f920e1e2e96bb0b68971ce9826b78a7e441c3f..8217c2b9818456aae1125d5d36f6e8ee670924bf 100644 --- a/common/utils/T/tracer/logger/textlog.c +++ b/common/utils/T/tracer/logger/textlog.c @@ -131,7 +131,7 @@ static struct chunk next_chunk(char **s, database_event_format f) cur++; *s = cur; if (find_argument(name, f, &it, &event_arg) == 0) goto error; - return (struct chunk){type:C_ARG_NAME, s:name, it:it, event_arg:event_arg}; + return (struct chunk){.type = C_ARG_NAME, .s = name, .it = it, .event_arg = event_arg}; } /* { } is name of event (anything in between is smashed) */ @@ -143,7 +143,7 @@ static struct chunk next_chunk(char **s, database_event_format f) *cur = 0; cur++; *s = cur; - return (struct chunk){type:C_EVENT_NAME}; + return (struct chunk){.type = C_EVENT_NAME}; } /* anything but [ and { is raw string */ @@ -151,10 +151,10 @@ static struct chunk next_chunk(char **s, database_event_format f) name = cur; while (*cur && *cur != '[' && *cur != '{') cur++; *s = cur; - return (struct chunk){type:C_STRING, s:name}; + return (struct chunk){.type = C_STRING, .s = name}; error: - return (struct chunk){type:C_ERROR}; + return (struct chunk){.type = C_ERROR}; } logger *new_textlog(event_handler *h, void *database, diff --git a/common/utils/T/tracer/macpdu2wireshark.c b/common/utils/T/tracer/macpdu2wireshark.c index cfa90a24db6a6c94779d35f7d075dfa8aeb17fa5..d7c4b23b51639b252fa6af6fc07a916e3c41e620 100644 --- a/common/utils/T/tracer/macpdu2wireshark.c +++ b/common/utils/T/tracer/macpdu2wireshark.c @@ -808,7 +808,7 @@ int main(int n, char **v) d.to.sin_port = htons(port); d.to.sin_addr.s_addr = inet_addr(ip); new_thread(receiver, &d); - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; /* read messages */ while (1) { diff --git a/common/utils/T/tracer/multi.c b/common/utils/T/tracer/multi.c index 73fadc37d344920642262b98fb0e4b3a32fac7f5..0b2e48ec7a8c1324be569e0ee559c3b8a9f66870 100644 --- a/common/utils/T/tracer/multi.c +++ b/common/utils/T/tracer/multi.c @@ -52,7 +52,7 @@ int send_messages_txt(int s, char *T_messages_txt, int T_messages_txt_len) /* TODO: be careful, we use internal T stuff, to rewrite? */ T_LOCAL_size = 0; T_HEADER(T_ID(-1)); - T_PUT_buffer(1, ((T_buffer){addr:(src), length:(send_size)})); + T_PUT_buffer(1, ((T_buffer){.addr = src, .length = send_size})); if (socket_send(s, &T_LOCAL_size, 4) == -1) return -1; if (socket_send(s, buf, T_LOCAL_size) == -1) return -1; src += send_size; @@ -242,7 +242,7 @@ int main(int n, char **v) /* create listener socket */ l = create_listen_socket("0.0.0.0", local_port); - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; current_nfd = 0; diff --git a/common/utils/T/tracer/record.c b/common/utils/T/tracer/record.c index e4c059a5ca2f20caba944f322f5ccfa8393f82c0..9e3c4c41a34f0cf23c06b76e83c3393255e5cfd2 100644 --- a/common/utils/T/tracer/record.c +++ b/common/utils/T/tracer/record.c @@ -123,7 +123,7 @@ int main(int n, char **v) if (signal(SIGINT, force_stop) == SIG_ERR) abort(); if (signal(SIGTSTP, force_stop) == SIG_ERR) abort(); - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; /* read messages */ while (run) { diff --git a/common/utils/T/tracer/replay.c b/common/utils/T/tracer/replay.c index c199a668d58f7dfde3fc07378aaf112267d7afea..d9a505520a4632ac69390d63b8fa1961d118198a 100644 --- a/common/utils/T/tracer/replay.c +++ b/common/utils/T/tracer/replay.c @@ -136,7 +136,7 @@ int main(int n, char **v) new_thread(get_message_thread, &socket); - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; while (1) { int type; diff --git a/common/utils/T/tracer/textlog.c b/common/utils/T/tracer/textlog.c index 6ead65d87a045f34be2cbf711a08ad16ebbf5458..0a4d2e555c895e0ce8cdf70615de047bd49279a6 100644 --- a/common/utils/T/tracer/textlog.c +++ b/common/utils/T/tracer/textlog.c @@ -130,7 +130,7 @@ int main(int n, char **v) /* send the first message - activate selected traces */ activate_traces(socket, is_on, number_of_events); - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; /* read messages */ while (1) { diff --git a/common/utils/T/tracer/to_vcd.c b/common/utils/T/tracer/to_vcd.c index be3c8391158a8d95e71e0bd9075e0ffe7b237720..6458443394d48023c7884fd99bba22c366db69b7 100644 --- a/common/utils/T/tracer/to_vcd.c +++ b/common/utils/T/tracer/to_vcd.c @@ -366,7 +366,7 @@ int main(int n, char **v) if (signal(SIGINT, force_stop) == SIG_ERR) abort(); if (signal(SIGTSTP, force_stop) == SIG_ERR) abort(); - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; /* read messages */ while (run) { diff --git a/common/utils/T/tracer/ue.c b/common/utils/T/tracer/ue.c index 31584e02153f916159c61959584827a93a4b4e72..b28f83b0f283ae06af835c10869b03dce39b44a5 100644 --- a/common/utils/T/tracer/ue.c +++ b/common/utils/T/tracer/ue.c @@ -758,7 +758,7 @@ int main(int n, char **v) if (pthread_mutex_init(&ue_data.lock, NULL)) abort(); setup_event_selector(g, database, is_on, is_on_changed, &ue_data); - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; restart: clear_remote_config(); diff --git a/common/utils/T/tracer/vcd.c b/common/utils/T/tracer/vcd.c index c57798c4c451115aad2162a06e03ce21374962af..e62fc046eb7bd9e51ad35e026abad78e286e0a1b 100644 --- a/common/utils/T/tracer/vcd.c +++ b/common/utils/T/tracer/vcd.c @@ -187,7 +187,7 @@ int main(int n, char **v) /* send the first message - activate selected traces */ is_on_changed(&vcd_data); - OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL }; + OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL}; /* read messages */ while (1) { diff --git a/common/utils/T/tracer/view/ticktime.c b/common/utils/T/tracer/view/ticktime.c index 1e1c7352a07a1acafe1f57681e8925a099fcd6ef..7fa13e4d7a37e1a75f7d84a9479ad4182cba1a2c 100644 --- a/common/utils/T/tracer/view/ticktime.c +++ b/common/utils/T/tracer/view/ticktime.c @@ -129,8 +129,7 @@ static void *ticktime_thread(void *_this) pixel_length = this->pixel_length; if (this->autoscroll) { - tnext = time_add(this->latest_time, - (struct timespec){tv_sec:0,tv_nsec:1}); + tnext = time_add(this->latest_time, (struct timespec){.tv_sec = 0, .tv_nsec = 1}); tstart = time_sub(tnext, nano_to_time(pixel_length * width)); this->start_time = tstart; } else { diff --git a/common/utils/T/tracer/view/time.c b/common/utils/T/tracer/view/time.c index 287e7b1c7be029af0a815febb271938d888857a4..18fc02e4d751159e6611748fed4e4a7c895d2207 100644 --- a/common/utils/T/tracer/view/time.c +++ b/common/utils/T/tracer/view/time.c @@ -122,8 +122,7 @@ static void *time_thread(void *_this) pixel_length = this->pixel_length; if (this->autoscroll) { - tnext = time_add(this->latest_time, - (struct timespec){tv_sec:0,tv_nsec:1}); + tnext = time_add(this->latest_time, (struct timespec){.tv_sec = 0, .tv_nsec = 1}); tstart = time_sub(tnext, nano_to_time(pixel_length * width)); this->start_time = tstart; } else {