mirror of
https://https.git.savannah.gnu.org/git/findutils.git
synced 2026-01-26 15:39:06 +00:00
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.
This commit is contained in:
parent
7ce6b13157
commit
44ab86cdc9
@ -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)
|
||||
{
|
||||
|
||||
@ -60,7 +60,7 @@ typedef enum
|
||||
} GetwordEndianState;
|
||||
|
||||
int getword (FILE *fp, const char *filename,
|
||||
size_t minvalue, size_t maxvalue,
|
||||
size_t maxvalue,
|
||||
GetwordEndianState *endian_state_flag);
|
||||
|
||||
bool putword (FILE *fp, int word,
|
||||
|
||||
@ -71,7 +71,7 @@ decode_value (const unsigned char data[],
|
||||
{
|
||||
/* the native value is inside the limit and the
|
||||
* swapped value is not. We take this as proof
|
||||
* that we should be using the ative byte order.
|
||||
* that we should be using the native byte order.
|
||||
*/
|
||||
*endian_state_flag = GetwordEndianStateNative;
|
||||
}
|
||||
@ -113,7 +113,6 @@ decode_value (const unsigned char data[],
|
||||
int
|
||||
getword (FILE *fp,
|
||||
const char *filename,
|
||||
size_t minvalue,
|
||||
size_t maxvalue,
|
||||
GetwordEndianState *endian_state_flag)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user