diff --git a/gtkedit/ChangeLog b/gtkedit/ChangeLog index b6cd44a5a..900c49d0b 100644 --- a/gtkedit/ChangeLog +++ b/gtkedit/ChangeLog @@ -1,3 +1,8 @@ +2001-06-15 Pavel Roskin + + * edit.c (edit_execute_cmd): Put time format to a variable to + avoid gcc warning about Y2K issues with %c in strftime(). + 2001-06-14 Pavel Roskin * edit.c: Declare cmd_F* static. Comment out cmd_F9. diff --git a/gtkedit/edit.c b/gtkedit/edit.c index cc3370334..0ab8a6b77 100644 --- a/gtkedit/edit.c +++ b/gtkedit/edit.c @@ -2570,10 +2570,11 @@ int edit_execute_cmd (WEdit * edit, int command, int char_for_insertion) time_t t; #ifdef HAVE_STRFTIME char s[1024]; + static const char time_format[] = "%c"; #endif time (&t); #ifdef HAVE_STRFTIME - strftime (s, sizeof (s), "%c", localtime (&t)); + strftime (s, sizeof (s), time_format, localtime (&t)); edit_printf (edit, s); #else edit_printf (edit, ctime (&t));