1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
From: Robert Luberda <robert@debian.org>
Date: Wed, 23 Apr 2014 23:35:41 +0200
Subject: Fix `variable-set-but-unused' gcc warnings
---
checks.c | 3 +--
time.c | 6 +-----
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/checks.c b/checks.c
index e965adb..a8c8493 100644
--- a/checks.c
+++ b/checks.c
@@ -1728,7 +1728,6 @@ char *token; /* user/group/host pattern */
{
char chkbuf[1024];
char *userpat, *grouppat, *hostpat;
- char *colon;
int match, i;
if (strlen(token) > sizeof(chkbuf)-4) {
@@ -1779,7 +1778,7 @@ without -DHAVE_INNETGR.\n");
return -1;
}
- colon = grouppat = strchr(token, ':');
+ grouppat = strchr(token, ':');
userpat = token;
if (*token == '\0' && !hostpat) {
/* Nothing in pattern?! */
diff --git a/time.c b/time.c
index 0223f91..1fe3dc6 100644
--- a/time.c
+++ b/time.c
@@ -75,12 +75,11 @@ int invert; /* Inverts the test */
* 0 otherwise.
* Side effect: sets the matches.time field.
*/
- int match;
int iwd;
char *tok;
TimeList *new;
- for (iwd=0, match=0; (tok=wdlist[iwd]); iwd++) {
+ for (iwd=0; (tok=wdlist[iwd]); iwd++) {
new = (TimeList *) malloc(sizeof(TimeList));
if (!new)
return Error(0, 0, "%t\n\tFailed to malloc space for time entry\n");
@@ -285,7 +284,6 @@ char *d; /* Returned with day number (0=Sunday) or ANYDAY */
int hh1, mm1;
int hh2, mm2;
int i, l;
- int has_relop;
#ifdef HAVE_ENUM
enum { LT, LE, GT, GE } relop;
#else
@@ -309,10 +307,8 @@ char *d; /* Returned with day number (0=Sunday) or ANYDAY */
#endif
s = str;
- has_relop = 0;
if (*s == '<' || *s == '>') {
/* Must be xhh[:mm][/dayname] */
- has_relop = 1;
switch (*s++) {
case '<':
relop = (*s == '=') ? (s++, LE) : LT;
|