summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAntti-Juhani Kaijanaho <ajk@debian.org>2012-06-08 19:44:11 +0300
committerAntti-Juhani Kaijanaho <ajk@debian.org>2012-06-08 19:44:11 +0300
commita132bb1dec969d2852d98e32eaaa7b2da8c309c8 (patch)
treed7889dabeb6640c57d158568df7ae639c0229617 /lib
parentf690c98a923c59f2a654127077c19710ff187f49 (diff)
downloaddctrl-tools-a132bb1dec969d2852d98e32eaaa7b2da8c309c8.tar.gz
Add -Wextra to non-package builds (and clean up the resulting warnings).
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/atom.c4
-rw-r--r--lib/para_pool.h4
-rw-r--r--lib/predicate.c12
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/atom.c b/lib/atom.c
index 26d223a..f524187 100644
--- a/lib/atom.c
+++ b/lib/atom.c
@@ -1,5 +1,5 @@
/* dctrl-tools - Debian control file inspection tools
- Copyright © 2011 Antti-Juhani Kaijanaho
+ Copyright © 2011, 2012 Antti-Juhani Kaijanaho
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -158,7 +158,7 @@ static bool atom_field_verify(struct atom * atom, FSAF * fp,
bool atom_verify(struct atom * at, para_t * par)
{
FSAF * fp = par->common->fp;
- if (at->field_inx == -1) {
+ if (at->field_inx == (size_t)-1) {
/* Take the full paragraph */
return atom_field_verify(at, fp, par->start, par->end);
}
diff --git a/lib/para_pool.h b/lib/para_pool.h
index 5867f25..138a532 100644
--- a/lib/para_pool.h
+++ b/lib/para_pool.h
@@ -1,5 +1,5 @@
/* dctrl-tools - Debian control file inspection tools
- Copyright © 2004 Antti-Juhani Kaijanaho
+ Copyright © 2004, 2012 Antti-Juhani Kaijanaho
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -65,7 +65,7 @@ bool para_pool_more(para_pool_t * pp)
// calls para_init
static inline
-para_t * new_para(para_pool_t * ppo, para_parser_t * ppa)
+para_t * new_para(para_pool_t * ppo __attribute__((unused)), para_parser_t * ppa)
{
para_t * rv = 0;
/*
diff --git a/lib/predicate.c b/lib/predicate.c
index 5d10b5d..9b5f32d 100644
--- a/lib/predicate.c
+++ b/lib/predicate.c
@@ -1,5 +1,5 @@
/* dctrl-tools - Debian control file inspection tools
- Copyright © 2003, 2004, 2008, 2010, 2011 Antti-Juhani Kaijanaho
+ Copyright © 2003, 2004, 2008, 2010, 2011, 2012 Antti-Juhani Kaijanaho
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -70,7 +70,7 @@ static bool eval_AND(struct predicate *base_p, para_t * para)
static void print_AND(struct predicate *base_p, size_t indent)
{
struct binary_predicate *p = (struct binary_predicate *)base_p;
- for (int i = 0; i < indent; i++) putchar(' ');
+ for (size_t i = 0; i < indent; i++) putchar(' ');
puts("AND");
print(p->lrand, indent+1);
print(p->rrand, indent+1);
@@ -86,7 +86,7 @@ static bool eval_OR(struct predicate *base_p, para_t * para)
static void print_OR(struct predicate *base_p, size_t indent)
{
struct binary_predicate *p = (struct binary_predicate *)base_p;
- for (int i = 0; i < indent; i++) putchar(' ');
+ for (size_t i = 0; i < indent; i++) putchar(' ');
puts("OR");
print(p->lrand, indent+1);
print(p->rrand, indent+1);
@@ -101,7 +101,7 @@ static bool eval_NOT(struct predicate *base_p, para_t * para)
static void print_NOT(struct predicate *base_p, size_t indent)
{
struct unary_predicate *p = (struct unary_predicate *)base_p;
- for (int i = 0; i < indent; i++) putchar(' ');
+ for (size_t i = 0; i < indent; i++) putchar(' ');
puts("NOT");
print(p->rand, indent+1);
}
@@ -117,7 +117,7 @@ static void print_ATOM(struct predicate *base_p, size_t indent)
{
struct atomary_predicate *p = (struct atomary_predicate *)base_p;
char ind[indent+1];
- for (int i = 0; i < indent; i++) ind[i] = ' ';
+ for (size_t i = 0; i < indent; i++) ind[i] = ' ';
ind[indent] = '\0';
printf("%sATOM", ind);
printf("%s field_name = %s\n", ind, p->atom->field_name);
@@ -170,7 +170,7 @@ struct predicate *predicate_ATOM(struct atom *at)
}
-bool check_predicate(struct predicate * p)
+bool check_predicate(struct predicate * p __attribute__((unused)))
{
// static checking of predicate
// currently no operation