1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

libDtSearch: Resolve 137 -Wunused-variable warnings.

This commit is contained in:
Peter Howkins 2012-11-12 17:13:36 +00:00
parent 9040256676
commit 43cfaeaa65
16 changed files with 14 additions and 44 deletions

View file

@ -256,7 +256,6 @@ BAD_DBA:
static void calculate_idfs (void)
{
int i;
char *cptr;
double dbl;
for (i = 0; i < saveusr.stemcount; i++) {
@ -1084,7 +1083,7 @@ static DB_ADDR read_d99 (struct or_hwordrec *wordrec)
static DB_ADDR readbuf [DBAS_PER_BLOCK];
static DB_ADDR *bufptr, *endbuf;
static FILE *fptr;
static long bal_read, request_read, actual_read;
static long bal_read, request_read;
/* First call for new term */
if (wordrec) {

View file

@ -153,8 +153,6 @@ char *OEF_readme = NULL;
/*------------ OTHER GLOBALS -----------*/
SAVEUSR saveusr = { 0 };
static DtSrHitword
next_hitwords [DtSrMAX_STEMCOUNT];
/****************************************/
@ -475,16 +473,11 @@ char *retncode_str (int num)
/************************************************/
void Opera_Engine (void)
{
int i, len, ws_flag;
int i;
char sprintbuf [1024];
char *ptr, *ptr2;
LLIST *bloblist;
LLIST *llp;
FILE *stream;
DBLK *db;
PARG parg;
DB_ADDR dba;
static int first_idletime_call = TRUE;
static time_t
start_time = 0L;

View file

@ -537,7 +537,7 @@ int DtSearchQuery (
int *stemcount) /* put size of stems array */
{
int final_request;
int i, maxbkt;
int i;
char *ptr;
DBLK *db;
LLIST *llp;
@ -722,8 +722,6 @@ int DtSearchRetrieve (
long *clearlen, /* length of returned cleartext */
int *fzkeyi) /* ptr to array of FZKEYSZ integers */
{
int i;
if (!valid_dbname (dbname))
return DtSrREINIT;
usrblk.dba = dba;

View file

@ -102,7 +102,6 @@ static char *language_name (int language_number)
void print_dbrec (char *dbname, struct or_dbrec * dbrec)
{
int i;
char *cptr;
int blobs_are_possible = FALSE;
printf (catgets (dtsearch_catd, MS_dbrec, 1,

View file

@ -133,8 +133,6 @@ static LLIST *append_blob (LLIST ** bloblink,
struct or_blobrec * blobrec)
{
LLIST *new;
int i;
char *to;
new = austext_malloc (sizeof (struct or_blobrec) + sizeof (LLIST) + 4,
PROGNAME "36", NULL);
@ -418,7 +416,6 @@ int ve_append_notes (void)
static char formfeed_line[] = "\f\n";
struct or_miscrec
miscrec;
_Xltimeparams localtime_buf;
struct tm *time_ptr;
/* Test if function is disabled */
@ -600,7 +597,6 @@ static void store_next_misc (
store_state = STORE_DONE;
static char *targ = NULL;
static int targlen = 0;
static int fzkeysz = 0;
static int abstrsz = 0;
int i;
@ -703,9 +699,7 @@ int ve_getrec_dba (LLIST ** bloblist)
myblobuf;
struct or_miscrec
mymiscrec;
int i;
int debugging = (usrblk.debug & USRDBG_RETRVL);
char *src, *targ;
LLIST *new, *lastnode, **lastlink;
int vistano = usrblk.dblk->vistano;
int is_first_misc = TRUE;

View file

@ -278,7 +278,7 @@ int hc_encode (struct or_blobrec * targblobrec,
} un1;
static char temp1 [MAX_NUM_CHAR+1]; ...repl by blobrec;
************/
char *ptr, *targ, *src;
char *targ, *src;
int i, j;
char temp;
char ret_code = TRUE;

View file

@ -488,7 +488,6 @@ static UCHAR *search_kanjitree (void)
static JPNTREE *node, *last_node;
static UCHAR *substrp, *substrend;
static int direction;
static int nodelen;
static int jcharlen;
if (is_new_substring) {

View file

@ -246,7 +246,6 @@ static int search_wordtree (WORDTREE *wordtree, UCHAR *wordstring)
{
static int direction;
static WORDTREE *node;
static char *cptr;
if (debugging_search_wordtree)
fprintf (aa_stderr, PROGNAME"196 search wordtree for '%s':\n",
@ -329,8 +328,6 @@ char *teskey_parser (PARG *parg)
static size_t outbufsz = 0;
static UCHAR *endmaxword; /* end largest possible output word */
static UCHAR *outp; /* next loc in outbuf */
static char *begw; /* beginning of a word in the input buffer */
static char *endw; /* end of a word in the input buffer */
static int *charmap;
static int minwordsz, maxwordsz;
static int wordlen;
@ -657,7 +654,6 @@ int load_wordtree (
int is_duplicate;
long linecount = 0;
char *token;
char *cptr;
char readbuf [256];
char sprintbuf [_POSIX_PATH_MAX + 1024];
FILE *fileid;
@ -1091,7 +1087,6 @@ static void free_paice_rules (PRULE ***rules_table_ptr)
*/
static int load_paice_suffixes (DBLK *dblk, DBLK *dblist)
{
int i;
FILE *fp;
DBLK *db;
PRULE *prule, **prule_link;
@ -1571,9 +1566,7 @@ char *null_lstrupr (char *s, DBLK *d)
*/
int load_language (DBLK *dblk, DBLK *dblist)
{
int i;
int oops = FALSE;
char msgbuf [512];
int language = dblk->dbrec.or_language;
if (debugging_loadlang)

View file

@ -443,8 +443,6 @@ static void set_boolint (int *boolint, char *keyword,
/* sets OE_fileio string pointer */
static void set_fileio (_Xstrtokparams *strtok_buf)
{
char *ptr;
/* if a value is missing, presume -ON */
if ((token = _XStrtok(NULL, DELIMITERS, *strtok_buf)) == NULL) {
OE_fileio = "-ON";
@ -488,8 +486,6 @@ static void set_fileio (_Xstrtokparams *strtok_buf)
static void read_rest_of_line (char *keyword, char **passed_ptr,
_Xstrtokparams *strtok_buf)
{
int len;
if ((token = _XStrtok(NULL, "\n", *strtok_buf)) == NULL) {
sprintf (sprintbufp, catgets (dtsearch_catd, MS_loadocf, 1007,
"%s%s: Empty %s string ignored."),
@ -833,7 +829,6 @@ static void read_keytypes (int how_many, _Xstrtokparams *strtok_buf)
static int ocfopen (char *prefix, char *fname, FILE ** stream)
{
char fullname[1024];
char *cptr;
FILE *fptr;
struct stat statbuf;
int is_prespecified_fname = (prefix == NULL && fname == NULL);
@ -917,8 +912,7 @@ GOT_FULLNAME:
*/
int load_ocf (void)
{
int i;
char *ptr, *p, *q;
char *p, *q;
char sprintbuf[1024];
char cfgfnamebuf[1024];
char inbuf[1024];

View file

@ -170,8 +170,9 @@ int db_glob_init = 0;
calls would complete before a new task is run. If this assumption is
ever "broken" then lock_reply will need to be placed back within db_global
again */
#ifndef SINGLE_USER
static LR_LOCK lock_reply; /* This used to be in db_global */
#endif
#ifdef MULTI_TASK
DB_TASK Currtask = {POINTER_ASSIGN((TASK FAR *)&db_global), POINTER_ASSIGN((char FAR *)NULL)};

View file

@ -464,7 +464,7 @@ typedef struct {LONG FAR *ptr; LOCK_DESC} LONG_P;
#ifndef NO_COUNTRY
typedef struct {struct CNTRY_TBL_S FAR *ptr; LOCK_DESC} CNTRY_TBL_P;
#endif
static struct sk {
struct sk {
INT sk_fld;
CHAR_P sk_val;
} __SK__;

View file

@ -61,7 +61,9 @@ TASK_DECL
{
register int ft_lc; /* loop control */
register FILE_ENTRY FAR *file_ptr;
#ifndef NO_TRANS
int ovfl_save;
#endif
DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_ALL));

View file

@ -598,7 +598,9 @@ FILE_NO to_file; /* ..to (not thru) file "to_file" */
PAGE_ENTRY FAR *pg_ptr;
PGZERO FAR *pgzero_ptr;
FILE_ENTRY FAR *file_ptr;
#ifndef SINGLE_USER
int FAR *appl_ptr, FAR *excl_ptr;
#endif
#ifndef SINGLE_USER
/*
@ -705,7 +707,9 @@ FILE_NO to_file; /* ..to (not thru) file "to_file" */
int dio_flush()
{
register int pgt_lc; /* loop control */
#ifndef NO_TRANS
int fno;
#endif
PAGE_ENTRY FAR *pg_ptr;
LOOKUP_ENTRY FAR *lu_ptr;

View file

@ -51,9 +51,6 @@
#include "vista.h"
#include "dbtype.h"
static DB_ADDR_P Cb = POINTER_INIT();
#define cb (Cb.ptr)
/* Read currency table
*/

View file

@ -412,7 +412,6 @@ static void print_counters (char *wordtype)
void ve_delete (void)
{
DB_ADDR dba;
DB_ADDR *dbap1, *dbap2;
char charbuf[200 + DtSrMAX_DB_KEYSIZE];
int i, j;
int ret_code;

View file

@ -110,8 +110,6 @@
static int SHM_FLAG = IPC_CREAT | S_IRUSR | S_IWUSR | S_IWGRP |
S_IRGRP | S_IROTH | S_IWOTH;
static int mem_break;
static char *mem_start;
static char *cur_pos;
static long mem_offset;