Commit 9aab83c5 authored by Raphael Defosseux's avatar Raphael Defosseux

Fixing a few last cppcheck errors/warnings

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 6a47f9e7
...@@ -46,7 +46,7 @@ void unregister_notifier(gui *_g, unsigned long notifier_id) { ...@@ -46,7 +46,7 @@ void unregister_notifier(gui *_g, unsigned long notifier_id) {
if (g->notifiers[i].id == notifier_id) break; if (g->notifiers[i].id == notifier_id) break;
if (i == g->notifiers_count) if (i == g->notifiers_count)
ERR("%s:%d: notifier_id %ld not found\n", __FILE__,__LINE__,notifier_id); ERR("%s:%d: notifier_id %lu not found\n", __FILE__,__LINE__,notifier_id);
free(g->notifiers[i].notification); free(g->notifiers[i].notification);
memmove(g->notifiers + i, g->notifiers + i + 1, memmove(g->notifiers + i, g->notifiers + i + 1,
......
...@@ -261,6 +261,7 @@ int main(int n, char **v) ...@@ -261,6 +261,7 @@ int main(int n, char **v)
if (fds == NULL) { perror("calloc"); exit(1); } if (fds == NULL) { perror("calloc"); exit(1); }
} }
i = 0; i = 0;
if (fds == NULL) { perror("null fds pointer"); exit(1); }
fds[i].fd = l; fds[i].fd = l;
fds[i].events = POLLIN; fds[i].events = POLLIN;
i++; i++;
......
...@@ -195,5 +195,10 @@ int main(int n, char **v) ...@@ -195,5 +195,10 @@ int main(int n, char **v)
handle_event(h, e); handle_event(h, e);
} }
if (on_off_name != NULL)
free(on_off_name);
if (on_off_action != NULL)
free(on_off_action);
return 0; return 0;
} }
...@@ -273,6 +273,6 @@ void PUTX2(OBUF *o, int i) { ...@@ -273,6 +273,6 @@ void PUTX2(OBUF *o, int i) {
void PUTUL(OBUF *o, unsigned long l) { void PUTUL(OBUF *o, unsigned long l) {
char s[128]; char s[128];
sprintf(s, "%ld", l); sprintf(s, "%lu", l);
PUTS(o, s); PUTS(o, s);
} }
...@@ -812,9 +812,6 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form, ...@@ -812,9 +812,6 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
free(bit1); free(bit1);
free(bit_pdcch); free(bit_pdcch);
free(llr_pdcch); free(llr_pdcch);
for (arx=0;arx<nb_antennas_rx;arx++) {
free(chest_t_abs[arx]);
}
//This is done to avoid plotting old data when TB0 is disabled, and TB1 is mapped onto CW0 //This is done to avoid plotting old data when TB0 is disabled, and TB1 is mapped onto CW0
/*if (phy_vars_ue->transmission_mode[eNB_id]==3 && phy_vars_ue->transmission_mode[eNB_id]==4){ /*if (phy_vars_ue->transmission_mode[eNB_id]==3 && phy_vars_ue->transmission_mode[eNB_id]==4){
......
...@@ -107,7 +107,7 @@ int s1ap_eNB_handle_trace_start(uint32_t assoc_id, ...@@ -107,7 +107,7 @@ int s1ap_eNB_handle_trace_start(uint32_t assoc_id,
{ {
S1AP_TraceStart_t *container; S1AP_TraceStart_t *container;
S1AP_TraceStartIEs_t *ie; S1AP_TraceStartIEs_t *ie;
struct s1ap_eNB_ue_context_s *ue_desc_p; struct s1ap_eNB_ue_context_s *ue_desc_p = NULL;
struct s1ap_eNB_mme_data_s *mme_ref_p; struct s1ap_eNB_mme_data_s *mme_ref_p;
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
......
...@@ -270,7 +270,7 @@ static void enb_config_display(void) ...@@ -270,7 +270,7 @@ static void enb_config_display(void)
printf( " ENB CONFIG FILE CONTENT LOADED:\n"); printf( " ENB CONFIG FILE CONTENT LOADED:\n");
printf( "----------------------------------------------------------------------\n"); printf( "----------------------------------------------------------------------\n");
for (i = 0; i < g_enb_properties.number; i++) { for (i = 0; i < g_enb_properties.number; i++) {
printf( "ENB CONFIG for instance %u:\n\n", i); printf( "ENB CONFIG for instance %d:\n\n", i);
printf( "\teNB name: \t%s\n",g_enb_properties.properties[i]->eNB_name); printf( "\teNB name: \t%s\n",g_enb_properties.properties[i]->eNB_name);
printf( "\teNB ID: \t%"PRIu32"\n",g_enb_properties.properties[i]->eNB_id); printf( "\teNB ID: \t%"PRIu32"\n",g_enb_properties.properties[i]->eNB_id);
printf( "\tCell type: \t%s\n",g_enb_properties.properties[i]->cell_type == CELL_MACRO_ENB ? "CELL_MACRO_ENB":"CELL_HOME_ENB"); printf( "\tCell type: \t%s\n",g_enb_properties.properties[i]->cell_type == CELL_MACRO_ENB ? "CELL_MACRO_ENB":"CELL_HOME_ENB");
......
...@@ -1103,7 +1103,7 @@ et_config_parse_opt_line ( ...@@ -1103,7 +1103,7 @@ et_config_parse_opt_line (
fprintf(stderr, "Please provide a valid -D/--delay-on-exit argument, %s is not a valid value\n", delay_on_exit); fprintf(stderr, "Please provide a valid -D/--delay-on-exit argument, %s is not a valid value\n", delay_on_exit);
exit(1); exit(1);
} }
printf("Delay on exit is %u\n", delay_on_exit); printf("Delay on exit is %d\n", (int) delay_on_exit);
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment