aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xChangeLog3
-rwxr-xr-xsrc/apoint.c8
-rwxr-xr-xsrc/calcurse.c25
-rwxr-xr-xsrc/day.c6
-rwxr-xr-xsrc/io.c4
-rwxr-xr-xsrc/notify.c4
-rwxr-xr-xsrc/recur.c22
-rwxr-xr-xsrc/recur.h4
-rwxr-xr-xsrc/utils.c12
9 files changed, 44 insertions, 44 deletions
diff --git a/ChangeLog b/ChangeLog
index a0c4a84..36cf91b 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+29 Jul 2007:
+ compiler warnings fixed
+
28 Jul 2007:
Dutch manual and po file added, many thanks to Jeremy Roon
configure.ac, Makefile.am and src/Makefile.am improved
diff --git a/src/apoint.c b/src/apoint.c
index dd3cbac..d949cb9 100755
--- a/src/apoint.c
+++ b/src/apoint.c
@@ -1,4 +1,4 @@
-/* $calcurse: apoint.c,v 1.13 2007/07/28 13:11:42 culot Exp $ */
+/* $calcurse: apoint.c,v 1.14 2007/07/29 20:59:09 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -92,10 +92,10 @@ apoint_add(int *hilt_app)
char *format_message_1 = _("You entered an invalid start time, should be [h:mm] or [hh:mm]");
char *format_message_2 = _("You entered an invalid end time, should be [h:mm] or [hh:mm] or [mm]");
char *enter_str = _("Press [Enter] to continue");
- int Id;
+ int Id = 1;
char item_time[LTIME] = "";
char item_mesg[BUFSIZ] = "";
- long apoint_duration, apoint_start;
+ long apoint_duration = 0, apoint_start;
apoint_llist_node_t *apoint_pointeur;
struct event_s *event_pointeur;
unsigned heures, minutes;
@@ -504,7 +504,7 @@ apoint_switch_notify(int item_num)
apoint_llist_node_t *apoint;
struct day_item_s *p;
long date;
- int apoint_nb, n, need_chk_notify;
+ int apoint_nb = 0, n, need_chk_notify;
p = day_get_item(item_num);
if (p->type != APPT && p->type != RECUR_APPT)
diff --git a/src/calcurse.c b/src/calcurse.c
index 2b55538..95edc0f 100755
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -1,4 +1,4 @@
-/* $calcurse: calcurse.c,v 1.51 2007/07/28 13:11:42 culot Exp $ */
+/* $calcurse: calcurse.c,v 1.52 2007/07/29 20:59:09 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -28,33 +28,16 @@
#include <config.h>
#endif /* HAVE_CONFIG_H */
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <ncurses.h>
-#include <unistd.h>
-#include <signal.h>
-#include <pthread.h>
-#include <time.h>
-#include <string.h>
#include <stdlib.h>
-#include <stdbool.h>
-#include <math.h>
-#include <locale.h>
-#include <stdio.h>
+#include <signal.h>
#include "i18n.h"
#include "io.h"
#include "help.h"
-#include "calendar.h"
#include "custom.h"
#include "utils.h"
-#include "vars.h"
#include "sigs.h"
-#include "wins.h"
-#include "apoint.h"
#include "day.h"
-#include "event.h"
-#include "recur.h"
#include "todo.h"
#include "args.h"
#include "notify.h"
@@ -146,8 +129,10 @@ main(int argc, char **argv)
init_pair(COLR_HIGH, COLOR_BLACK, COLOR_GREEN);
init_pair(COLR_CUSTOM, COLOR_RED, background);
- } else
+ } else {
colorize = false;
+ background = COLOR_BLACK;
+ }
vars_init(&conf);
wins_init(&win[CALENDAR], &win[APPOINTMENT], &win[TODO], &win[STATUS]);
diff --git a/src/day.c b/src/day.c
index 0ed71dc..c00c150 100755
--- a/src/day.c
+++ b/src/day.c
@@ -1,4 +1,4 @@
-/* $calcurse: day.c,v 1.25 2007/07/28 13:11:42 culot Exp $ */
+/* $calcurse: day.c,v 1.26 2007/07/29 20:59:09 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -229,7 +229,7 @@ day_store_recur_apoints(long date)
* The number of events and appointments in the current day are also updated.
*/
static int
-day_store_items(long date, int *pnb_events, int *pnb_apoints)
+day_store_items(long date, unsigned *pnb_events, unsigned *pnb_apoints)
{
int pad_length;
int nb_events, nb_recur_events;
@@ -466,7 +466,7 @@ day_edit_item(int item_num)
struct day_item_s *p;
struct recur_event_s *re;
- struct rpt_s *rpt;
+ struct rpt_s *rpt = 0L;
struct tm *lt;
time_t t;
date_t new_date;
diff --git a/src/io.c b/src/io.c
index 376644d..8cb1f10 100755
--- a/src/io.c
+++ b/src/io.c
@@ -1,4 +1,4 @@
-/* $calcurse: io.c,v 1.18 2007/07/28 13:11:42 culot Exp $ */
+/* $calcurse: io.c,v 1.19 2007/07/29 20:59:09 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -550,7 +550,7 @@ io_load_app(void)
time_t t;
int id = 0;
int freq;
- char type, state;
+ char type, state = 0L;
char *error =
_("FATAL ERROR in io_load_app: wrong format in the appointment or event\n");
diff --git a/src/notify.c b/src/notify.c
index e69317e..86b6745 100755
--- a/src/notify.c
+++ b/src/notify.c
@@ -1,4 +1,4 @@
-/* $calcurse: notify.c,v 1.16 2007/07/28 13:11:42 culot Exp $ */
+/* $calcurse: notify.c,v 1.17 2007/07/29 20:59:09 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -490,7 +490,7 @@ notify_print_options(WINDOW *win, int col)
void
notify_config_bar(void)
{
- WINDOW *conf_win;
+ WINDOW *conf_win = 0L;
char label[BUFSIZ];
char *buf;
char *number_str =
diff --git a/src/recur.c b/src/recur.c
index 52bc44d..ae50bea 100755
--- a/src/recur.c
+++ b/src/recur.c
@@ -1,4 +1,4 @@
-/* $calcurse: recur.c,v 1.27 2007/07/28 13:11:42 culot Exp $ */
+/* $calcurse: recur.c,v 1.28 2007/07/29 20:59:09 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -117,23 +117,27 @@ struct recur_event_s *recur_event_new(char *mesg, long day, int id,
* and the letter to be written in file.
*/
char
-recur_def2char(int define)
+recur_def2char(recur_types_t define)
{
char recur_char;
+ char *error = _("FATAL ERROR in recur_def2char: unknown recur type\n");
switch (define) {
- case 1:
+ case RECUR_DAILY:
recur_char = 'D';
break;
- case 2:
+ case RECUR_WEEKLY:
recur_char = 'W';
break;
- case 3:
+ case RECUR_MONTHLY:
recur_char = 'M';
break;
- case 4:
+ case RECUR_YEARLY:
recur_char = 'Y';
break;
+ default:
+ fputs(error, stderr);
+ exit(EXIT_FAILURE);
}
return (recur_char);
@@ -145,6 +149,7 @@ recur_def2char(int define)
*/
int recur_char2def(char type){
int recur_def;
+ char *error = _("FATAL ERROR in recur_char2def: unknown char\n");
switch (type) {
case 'D':
@@ -159,8 +164,11 @@ int recur_char2def(char type){
case 'Y':
recur_def = RECUR_YEARLY;
break;
+ default:
+ fputs(error, stderr);
+ exit(EXIT_FAILURE);
}
- return recur_def;
+ return (recur_def);
}
/* Write days for which recurrent items should not be repeated. */
diff --git a/src/recur.h b/src/recur.h
index a582ca5..84dae52 100755
--- a/src/recur.h
+++ b/src/recur.h
@@ -1,4 +1,4 @@
-/* $calcurse: recur.h,v 1.13 2007/07/28 13:11:42 culot Exp $ */
+/* $calcurse: recur.h,v 1.14 2007/07/29 20:59:09 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -78,7 +78,7 @@ recur_apoint_llist_node_t *recur_apoint_new(char *, long, long, char, int,
int, long, struct days_s *);
struct recur_event_s *recur_event_new(char *, long, int, int, int,
long, struct days_s *);
-char recur_def2char(int);
+char recur_def2char(recur_types_t);
int recur_char2def(char);
recur_apoint_llist_node_t *recur_apoint_scan(FILE *, struct tm, struct tm,
char, int, struct tm, struct days_s *,
diff --git a/src/utils.c b/src/utils.c
index 07a6175..9e18ef7 100755
--- a/src/utils.c
+++ b/src/utils.c
@@ -1,4 +1,4 @@
-/* $calcurse: utils.c,v 1.33 2007/07/28 13:11:43 culot Exp $ */
+/* $calcurse: utils.c,v 1.34 2007/07/29 20:59:09 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -743,17 +743,21 @@ void reset_status_page(void)
void other_status_page(int panel)
{
int nb_item, max_page;
+ char *error = _("FATAL ERROR in other_status_page: unknown panel\n");
switch (panel) {
- case 0:
+ case CALENDAR:
nb_item = NB_CAL_CMDS;
break;
- case 1:
+ case APPOINTMENT:
nb_item = NB_APP_CMDS;
break;
- case 2:
+ case TODO:
nb_item = NB_TOD_CMDS;
break;
+ default:
+ fputs(error, stderr);
+ exit(EXIT_FAILURE);
}
max_page = ceil( nb_item / (2*CMDS_PER_LINE) ) + 1;
if (status_page < max_page) {