From fa1dff894130765cb4a8fed41c42fc7125702c9c Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 16 Mar 2004 13:22:16 +0000 Subject: [PATCH] Get rid of a few warnings --- src/cqlutil.c | 8 +++++--- util/cql2pqf.c | 3 ++- util/cql2xcql.c | 4 +++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/cqlutil.c b/src/cqlutil.c index d915c59..5a28cb4 100644 --- a/src/cqlutil.c +++ b/src/cqlutil.c @@ -1,4 +1,4 @@ -/* $Id: cqlutil.c,v 1.3 2004-03-15 21:39:06 adam Exp $ +/* $Id: cqlutil.c,v 1.4 2004-03-16 13:22:16 adam Exp $ Copyright (C) 2002-2004 Index Data Aps @@ -92,7 +92,8 @@ struct cql_node *cql_apply_prefix(struct cql_node *n, const char *prefix, if (!n->u.st.index_uri && n->u.st.index) { /* not yet resolved.. */ const char *cp = strchr(n->u.st.index, '.'); - if (prefix && cp && strlen(prefix) == cp - n->u.st.index && + if (prefix && cp && + strlen(prefix) == (size_t) (cp - n->u.st.index) && !memcmp(n->u.st.index, prefix, strlen(prefix))) { char *nval = xstrdup(cp+1); @@ -108,7 +109,8 @@ struct cql_node *cql_apply_prefix(struct cql_node *n, const char *prefix, if (!n->u.st.relation_uri && n->u.st.relation) { const char *cp = strchr(n->u.st.relation, '.'); - if (prefix && cp && strlen(prefix) == cp - n->u.st.relation && + if (prefix && cp && + strlen(prefix) == (size_t)(cp - n->u.st.relation) && !memcmp(n->u.st.relation, prefix, strlen(prefix))) { char *nval = xstrdup(cp+1); diff --git a/util/cql2pqf.c b/util/cql2pqf.c index 9a11bbc..02a0bc5 100644 --- a/util/cql2pqf.c +++ b/util/cql2pqf.c @@ -1,4 +1,4 @@ -/* $Id: cql2pqf.c,v 1.3 2004-03-11 09:34:42 adam Exp $ +/* $Id: cql2pqf.c,v 1.4 2004-03-16 13:22:16 adam Exp $ Copyright (C) 2002-2004 Index Data Aps @@ -11,6 +11,7 @@ See the file LICENSE. #include #include +#include static void usage() { diff --git a/util/cql2xcql.c b/util/cql2xcql.c index d23a415..536e019 100644 --- a/util/cql2xcql.c +++ b/util/cql2xcql.c @@ -1,4 +1,4 @@ -/* $Id: cql2xcql.c,v 1.3 2004-03-11 09:34:42 adam Exp $ +/* $Id: cql2xcql.c,v 1.4 2004-03-16 13:22:16 adam Exp $ Copyright (C) 2002-2004 Index Data Aps @@ -8,8 +8,10 @@ See the file LICENSE. */ #include +#include #include +#include int main(int argc, char **argv) { -- 1.7.10.4