Fixes gcc 'format-scurity' issue (thanks Francois Boulogne for reporting this)
This commit is contained in:
parent
68322a536c
commit
8859475550
@ -1,3 +1,8 @@
|
|||||||
|
2009-06-01 Frederic Culot <frederic@culot.org>
|
||||||
|
|
||||||
|
* src/io.c: patch submitted by Francois Boulogne to fix gcc
|
||||||
|
'format-security' issue (thanks Francois for reporting this)
|
||||||
|
|
||||||
2009-05-22 Frederic Culot <frederic@culot.org>
|
2009-05-22 Frederic Culot <frederic@culot.org>
|
||||||
|
|
||||||
* src/apoint.c
|
* src/apoint.c
|
||||||
|
17
src/io.c
17
src/io.c
@ -1,4 +1,4 @@
|
|||||||
/* $calcurse: io.c,v 1.58 2009/01/24 18:45:35 culot Exp $ */
|
/* $calcurse: io.c,v 1.59 2009/06/01 08:04:04 culot Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calcurse - text-based organizer
|
* Calcurse - text-based organizer
|
||||||
@ -173,15 +173,16 @@ progress_bar (progress_bar_t type, int progress)
|
|||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case PROGRESS_BAR_SAVE:
|
case PROGRESS_BAR_SAVE:
|
||||||
EXIT_IF (progress < 0 || progress > PROGRESS_BAR_KEYS, error_msg);
|
EXIT_IF (progress < 0 || progress > PROGRESS_BAR_KEYS, "%s", error_msg);
|
||||||
status_mesg (mesg_sav, file[progress]);
|
status_mesg (mesg_sav, file[progress]);
|
||||||
break;
|
break;
|
||||||
case PROGRESS_BAR_LOAD:
|
case PROGRESS_BAR_LOAD:
|
||||||
EXIT_IF (progress < 0 || progress > PROGRESS_BAR_KEYS, error_msg);
|
EXIT_IF (progress < 0 || progress > PROGRESS_BAR_KEYS, "%s", error_msg);
|
||||||
status_mesg (mesg_load, file[progress]);
|
status_mesg (mesg_load, file[progress]);
|
||||||
break;
|
break;
|
||||||
case PROGRESS_BAR_EXPORT:
|
case PROGRESS_BAR_EXPORT:
|
||||||
EXIT_IF (progress < 0 || progress > PROGRESS_BAR_EXPORT_TODO, error_msg);
|
EXIT_IF (progress < 0
|
||||||
|
|| progress > PROGRESS_BAR_EXPORT_TODO, "%s", error_msg);
|
||||||
status_mesg (mesg_export, data[progress]);
|
status_mesg (mesg_export, data[progress]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -812,7 +813,7 @@ io_save_cal (conf_t *conf, io_save_display_t display)
|
|||||||
|
|
||||||
data_file = fopen (path_conf, "w");
|
data_file = fopen (path_conf, "w");
|
||||||
if (data_file == NULL)
|
if (data_file == NULL)
|
||||||
ERROR_MSG (access_pb);
|
ERROR_MSG ("%s", access_pb);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
custom_color_theme_name (theme_name);
|
custom_color_theme_name (theme_name);
|
||||||
@ -924,7 +925,7 @@ io_save_cal (conf_t *conf, io_save_display_t display)
|
|||||||
progress_bar (PROGRESS_BAR_SAVE, PROGRESS_BAR_TODO);
|
progress_bar (PROGRESS_BAR_SAVE, PROGRESS_BAR_TODO);
|
||||||
data_file = fopen (path_todo, "w");
|
data_file = fopen (path_todo, "w");
|
||||||
if (data_file == NULL)
|
if (data_file == NULL)
|
||||||
ERROR_MSG (access_pb);
|
ERROR_MSG ("%s", access_pb);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (i = todolist; i != 0; i = i->next)
|
for (i = todolist; i != 0; i = i->next)
|
||||||
@ -946,7 +947,7 @@ io_save_cal (conf_t *conf, io_save_display_t display)
|
|||||||
progress_bar (PROGRESS_BAR_SAVE, PROGRESS_BAR_APTS);
|
progress_bar (PROGRESS_BAR_SAVE, PROGRESS_BAR_APTS);
|
||||||
data_file = fopen (path_apts, "w");
|
data_file = fopen (path_apts, "w");
|
||||||
if (data_file == NULL)
|
if (data_file == NULL)
|
||||||
ERROR_MSG (access_pb);
|
ERROR_MSG ("%s", access_pb);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
recur_save_data (data_file);
|
recur_save_data (data_file);
|
||||||
@ -968,7 +969,7 @@ io_save_cal (conf_t *conf, io_save_display_t display)
|
|||||||
progress_bar (PROGRESS_BAR_SAVE, PROGRESS_BAR_KEYS);
|
progress_bar (PROGRESS_BAR_SAVE, PROGRESS_BAR_KEYS);
|
||||||
data_file = fopen (path_keys, "w");
|
data_file = fopen (path_keys, "w");
|
||||||
if (data_file == NULL)
|
if (data_file == NULL)
|
||||||
ERROR_MSG (access_pb);
|
ERROR_MSG ("%s", access_pb);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
keys_save_bindings (data_file);
|
keys_save_bindings (data_file);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user