gem-graph-client/static void fsm journal.forget

81 lines
3.2 KiB
Plaintext
Raw Normal View History

2024-09-14 23:03:19 +02:00
//------------------------------------------------------------------------------------
static void fsm_journal_get_event_date (char **event)
{
struct timeval tv;
gettimeofday (&tv, NULL);
long yy_dd_mm = tv.tv_sec;
long usec = tv.tv_usec;
//strftime (buf1, JOURNAL_DATE_MAX_LENGTH, "%D %T", localtime (&yy_dd_mm));
//printf ("%s + %6ld %6d ", buf1, usec, nb);
printf(*event);// = "ldkvbhej xadrhsjfvrejhs";
}
void fsm_journal_publish (journal jj, char *message)
{
unit *a_unit = jj.last;
char buf [JOURNAL_DATE_MAX_LENGTH];
int nb = 0;
while (a_unit)
{
// Format time, "ddd yyyy-mm-dd hh:mm:ss zzz" "%Y-%m-%d %H:%M:%S"
// https://www.man7.org/linux/man-pages/man3/strftime.3.html
strftime(buf, sizeof(buf), "%D %T", localtime(&a_unit->yy_dd_mm));
printf ("%s + %6ld %6d %s\n", buf, a_unit->usec, nb, a_unit->message);
a_unit = a_unit->prev;
nb ++;
}
// char *event [JOURNAL_DATE_MAX_LENGTH] = "gyufgbyfjuvfde";
int **p_event [JOURNAL_DATE_MAX_LENGTH];
fsm_journal_get_event_date (*p_event); // TODO
printf ("%s\n", message);
}
// https://nicolasj.developpez.com/articles/libc/string/
// https://thelinuxcode.com/pass-string-function-c-language/
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
jean@n-guix-port:~/Gem-Graph/gem-graph-client [env] $ make run
DEP build/src/fsm/journal.d
src/fsm/journal.c: Dans la fonction « fsm_journal_get_event_date »:
src/fsm/journal.c:55:10: attention: variable inutilisée « usec » [-Wunused-variable]
55 | long usec = tv.tv_usec;
| ^~~~
src/fsm/journal.c:54:10: attention: variable inutilisée « yy_dd_mm » [-Wunused-variable]
54 | long yy_dd_mm = tv.tv_sec;
| ^~~~~~~~
src/fsm/journal.c: Dans la fonction « fsm_journal_publish »:
src/fsm/journal.c:155:5: attention: « event » est utilisé sans avoir été initialisé [-Wuninitialized]
155 | fsm_journal_get_event_date (*event); // TODO
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/fsm/journal.c:154:12: note: « event » déclaré ici
154 | char **event [JOURNAL_DATE_MAX_LENGTH];
| ^~~~~
CC build/src/fsm/journal.o
LD bin/gem-graph-client
bin/gem-graph-client
09/14/24 10:05:10 + 772883 0 fsm fsm_init() start
09/14/24 10:05:10 + 772887 1 fsm fsm_measures_list_init()
09/14/24 10:05:10 + 772887 2 fsm fsm_results_list_init()
09/14/24 10:05:10 + 772887 3 prefer fsm_displayable_list_init()
09/14/24 10:05:10 + 772887 4 fsm fsm_displayable_list_init()
09/14/24 10:05:10 + 772887 5 prefer fsm_preferences_init()
09/14/24 10:05:10 + 772887 6 fsm fsm_preferences_init()
09/14/24 10:05:10 + 772887 7 fsm fsm_init() end
09/14/24 10:05:10 + 796793 8 widget on_windows_startup()
09/14/24 10:05:10 + 796798 9 widget on_windows_activation()
09/14/24 10:05:10 + 798832 10 signal on_toggle_state_rules_data()
09/14/24 10:05:10 + 798835 11 signal switch_state_rules_data()
main That'all folks ! 👋️😄️
jean@n-guix-port:~/Gem-Graph/gem-graph-client [env] $