Fixing a few last cppcheck errors/warnings
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
@@ -46,7 +46,7 @@ void unregister_notifier(gui *_g, unsigned long notifier_id) {
|
||||
if (g->notifiers[i].id == notifier_id) break;
|
||||
|
||||
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);
|
||||
memmove(g->notifiers + i, g->notifiers + i + 1,
|
||||
|
||||
@@ -261,6 +261,7 @@ int main(int n, char **v)
|
||||
if (fds == NULL) { perror("calloc"); exit(1); }
|
||||
}
|
||||
i = 0;
|
||||
if (fds == NULL) { perror("null fds pointer"); exit(1); }
|
||||
fds[i].fd = l;
|
||||
fds[i].events = POLLIN;
|
||||
i++;
|
||||
|
||||
@@ -195,5 +195,10 @@ int main(int n, char **v)
|
||||
handle_event(h, e);
|
||||
}
|
||||
|
||||
if (on_off_name != NULL)
|
||||
free(on_off_name);
|
||||
if (on_off_action != NULL)
|
||||
free(on_off_action);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -273,6 +273,6 @@ void PUTX2(OBUF *o, int i) {
|
||||
|
||||
void PUTUL(OBUF *o, unsigned long l) {
|
||||
char s[128];
|
||||
sprintf(s, "%ld", l);
|
||||
sprintf(s, "%lu", l);
|
||||
PUTS(o, s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user