- some commas at the end of enum declarations removed.
- some unused statements and variables removed
- some more careful typing of query expressions in index.c.
(Writing 'condition ? (ptrtype *)stuff : NULL' doesn't give the
overall expression type 'ptrtype *'; it's better to put the cast
outside the ?:.)
git-svn-id: svn://svn.tartarus.org/sgt/agedu@8928
cda61777-01e9-0310-a592-
d414129be87e
static const int opthasval[NOPTIONS] = {OPTIONS(ZERO,ONE,IGNORE,IGNORE)};
static const char shortopts[] = {OPTIONS(IGNORE,IGNORE,STRINGNOCOMMA,IGNORE)};
static const char *const longopts[] = {OPTIONS(IGNORE,IGNORE,IGNORE,STRING)};
-enum { OPTIONS(SHORTNEWOPT,SHORTNEWOPT,SHORTTHISOPT,IGNORE) };
-enum { OPTIONS(LONGNEWOPT,LONGNEWOPT,IGNORE,LONGTHISOPT) };
+enum { OPTIONS(SHORTNEWOPT,SHORTNEWOPT,SHORTTHISOPT,IGNORE) UNUSEDENUMVAL1 };
+enum { OPTIONS(LONGNEWOPT,LONGNEWOPT,IGNORE,LONGTHISOPT) UNUSEDENUMVAL2 };
static const int shortvals[] = {OPTIONS(IGNORE,IGNORE,SHORTOPTVAL,IGNORE)};
static const int longvals[] = {OPTIONS(IGNORE,IGNORE,IGNORE,LONGOPTVAL)};
for (i = 0; licence[i]; i++)
fputs(licence[i], stdout);
-
- return 0;
}
return 0;
case OPT_SCAN:
prevbuf[0] = '\0';
tf = triewalk_next(tw, buf);
assert(tf);
+ prevtf = NULL; /* placate lint */
while (1) {
int i;
const struct html_config *cfg)
{
char *line, *p, *q, *r, *z1, *z2, c1, c2;
- int auth_provided = 0, auth_correct = 0;
+ int auth_correct = 0;
unsigned long index;
char *document, *ret;
p = q;
}
if (p < q) {
- auth_provided = 1;
while (p < q && isspace((unsigned char)*p))
p++;
r = p;
int fd, ret;
int authtype;
char *authstring = NULL;
- struct fd *f;
struct sockaddr_in addr;
socklen_t addrlen;
struct html_config cfg = *incfg;
/*
* Now construct an fd structure to hold it.
*/
- f = new_fdstruct(fd, FD_LISTENER);
+ new_fdstruct(fd, FD_LISTENER);
/*
* Read from standard input, and treat EOF as a notification
};
#define ELEMENT(t,offset) \
- ((offset) ? (struct trie_file *)((char *)(t) + (offset)) : NULL)
+ ((struct trie_file *) ((offset) ? ((char *)(t) + (offset)) : NULL))
#define NODE(t,offset) \
- ((offset) ? (struct avlnode *)((char *)(t) + (offset)) : NULL)
+ ((struct avlnode *) ((offset) ? ((char *)(t) + (offset)) : NULL))
#define OFFSET(t,node) \
- ((node) ? (off_t)((const char *)node - (const char *)t) : 0)
+ ((node) ? (off_t)((const char *)node - (const char *)t) : (off_t)0)
#define MAXDEPTH(node) ((node) ? (node)->maxdepth : 0)
indexbuild *indexbuild_new(void *t, off_t startoff, int nodecount,
return max;
}
+ return 0; /* placate lint */
}
void trie_fake_dir_atimes(void *t)