diff options
author | James Youngman <jay@gnu.org> | 2016-01-02 23:06:37 +0000 |
---|---|---|
committer | James Youngman <jay@gnu.org> | 2016-01-03 17:29:36 +0000 |
commit | 44ab86cdc956930d4a10ab55d0772e1957d4e46d (patch) | |
tree | c0e3d8baa60da8e52cdbdc980c4f50f547dd1694 /locate/locate.c | |
parent | 7ce6b131573accf4fbc4b2c26794fb90f6b1a44e (diff) | |
download | findutils-44ab86cdc956930d4a10ab55d0772e1957d4e46d.tar.gz |
locate: Fix compiler warnings.
* locate/word_io.c (decode_value): Fix typo in comment.
(getword): Remove unused parameter minvalue.
* locate/locatedb.h: Adjust declaration of decode_value to remove
minvalue parameter.
* locate/locate.c: Declare dolocate(). Make that function static.
(visit_old_format): Don't pass a minvalue parameter to getword()
since it no longer wants it.
Diffstat (limited to 'locate/locate.c')
-rw-r--r-- | locate/locate.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/locate/locate.c b/locate/locate.c index 7954895d..d406978b 100644 --- a/locate/locate.c +++ b/locate/locate.c @@ -161,6 +161,7 @@ static bool results_were_filtered; static const char *selected_secure_db = NULL; +static int dolocate (int argc, char **argv, int secure_db_fd); /* Change the number of days old the database can be * before we complain about it. @@ -492,7 +493,8 @@ visit_old_format (struct process_data *procdata, void *context) else maxval = (procdata->len - 0); word = getword (procdata->fp, procdata->dbfile, - minval, maxval, &procdata->endian_state); + maxval, &procdata->endian_state); + assert (word >= minval); procdata->count += word; assert (procdata->count >= 0); } @@ -1543,7 +1545,7 @@ cleanup_quote_opts (void) } -int +static int dolocate (int argc, char **argv, int secure_db_fd) { char *path_element = NULL; @@ -1922,7 +1924,6 @@ dolocate (int argc, char **argv, int secure_db_fd) return 1; } -#define ARRAYSIZE(a) (sizeof (a)/sizeof (a[0])) static int open_secure_db (void) { |