From 69d85c522819db626d10ee73447063b8342f2afb Mon Sep 17 00:00:00 2001 From: dfs Date: Sat, 14 Feb 1998 03:31:58 +0000 Subject: [PATCH] -- Compiles with no warnings with -Wall flag --- src/custom.h | 7 ++----- src/dorem.c | 6 +++--- src/dosubst.c | 6 +++++- src/files.c | 4 +--- src/token.c | 4 +--- 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/custom.h b/src/custom.h index 43ca0932..b5bbfed8 100644 --- a/src/custom.h +++ b/src/custom.h @@ -1,6 +1,6 @@ /***************************************************************/ /* */ -/* CUSTOM.H */ +/* CUSTOM.H.IN */ /* */ /* Contains various configuration parameters for Remind */ /* which you can customize. */ @@ -10,7 +10,7 @@ /* */ /***************************************************************/ -/* $Id: custom.h,v 1.8 1998-02-07 05:35:56 dfs Exp $ */ +/* $Id: custom.h,v 1.9 1998-02-14 03:31:58 dfs Exp $ */ /*---------------------------------------------------------------------*/ /* LAT_DEG, LAT_MIN and LAT_SEC: Latitude of your location */ @@ -211,9 +211,6 @@ #ifdef UNIX #define _POSIX_SOURCE -#endif - -#ifdef SYSV #define _SVID_SOURCE #endif diff --git a/src/dorem.c b/src/dorem.c index 38dede3c..50b3abb0 100644 --- a/src/dorem.c +++ b/src/dorem.c @@ -12,7 +12,7 @@ /***************************************************************/ #include "config.h" -static char const RCSID[] = "$Id: dorem.c,v 1.5 1998-02-10 04:11:44 dfs Exp $"; +static char const RCSID[] = "$Id: dorem.c,v 1.6 1998-02-14 03:31:59 dfs Exp $"; #include #include @@ -607,7 +607,7 @@ PUBLIC int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul, int r, y, m, d; char PrioExpr[25]; DynamicBuffer buf; - char *s, *s2; + char *s; Value v; DBufInit(&buf); @@ -941,7 +941,7 @@ PUBLIC int DoMsgCommand(char *cmd, char *msg) #ifdef WANT_SHELL_ESCAPING DynamicBuffer buf; - char *s, *t; + char *s; DBufInit(&buf); DBufInit(&execBuffer); diff --git a/src/dosubst.c b/src/dosubst.c index fc4099ce..26883fdd 100644 --- a/src/dosubst.c +++ b/src/dosubst.c @@ -11,7 +11,7 @@ /***************************************************************/ #include "config.h" -static char const RCSID[] = "$Id: dosubst.c,v 1.5 1998-02-10 03:33:49 dfs Exp $"; +static char const RCSID[] = "$Id: dosubst.c,v 1.6 1998-02-14 03:31:59 dfs Exp $"; #define L_IN_DOSUBST #include @@ -616,6 +616,7 @@ int jul, mode; if (!has_quote) { if (mode == CAL_MODE && t->typ == RUN_TYPE) { *DBufValue(dbuf) = 0; + dbuf->len = 0; } return OK; } @@ -645,6 +646,9 @@ int jul, mode; *os = 0; } + /* Violating encapsulation here!!!! */ + dbuf->len = strlen(dbuf->buffer); + return OK; } diff --git a/src/files.c b/src/files.c index 228d9310..fbf47003 100644 --- a/src/files.c +++ b/src/files.c @@ -12,7 +12,7 @@ /***************************************************************/ #include "config.h" -static char const RCSID[] = "$Id: files.c,v 1.6 1998-02-10 03:15:49 dfs Exp $"; +static char const RCSID[] = "$Id: files.c,v 1.7 1998-02-14 03:32:00 dfs Exp $"; #include @@ -150,8 +150,6 @@ static int ReadLineFromFile() #endif { int l; - char *ptr; - char *tmp; DynamicBuffer buf; diff --git a/src/token.c b/src/token.c index cf57d0f0..f8e605f8 100644 --- a/src/token.c +++ b/src/token.c @@ -11,7 +11,7 @@ /***************************************************************/ #include "config.h" -static char const RCSID[] = "$Id: token.c,v 1.5 1998-02-12 03:32:16 dfs Exp $"; +static char const RCSID[] = "$Id: token.c,v 1.6 1998-02-14 03:32:01 dfs Exp $"; #include #include @@ -154,8 +154,6 @@ Token *tok; char *s; #endif { - char *t; - int len=0; DynamicBuffer buf; DBufInit(&buf);