Patch warnings.diff from Nirgal

This commit is contained in:
Nirgal Vourgre 2011-08-28 19:48:44 -04:00 committed by Brian Bruns
parent fba597765d
commit aee657f603
4 changed files with 11 additions and 9 deletions

View File

@ -244,7 +244,6 @@ int mdb_read_row(MdbTableDef *table, unsigned int row)
MdbHandle *mdb = table->entry->mdb;
MdbColumn *col;
unsigned int i;
int rc;
int row_start;
size_t row_size;
int delflag, lookupflag;
@ -290,7 +289,7 @@ int mdb_read_row(MdbTableDef *table, unsigned int row)
/* use num_cols instead of num_fields -- bsb 03/04/02 */
for (i = 0; i < table->num_cols; i++) {
col = g_ptr_array_index(table->columns,fields[i].colnum);
rc = _mdb_attempt_bind(mdb, col, fields[i].is_null,
_mdb_attempt_bind(mdb, col, fields[i].is_null,
fields[i].start, fields[i].siz);
}

View File

@ -718,11 +718,12 @@ mdb_index_find_row(MdbHandle *mdb, MdbIndex *idx, MdbIndexChain *chain, guint32
void mdb_index_walk(MdbTableDef *table, MdbIndex *idx)
{
MdbHandle *mdb = table->entry->mdb;
int cur_pos = 0;
unsigned char marker;
MdbColumn *col;
unsigned int i;
/*
MdbHandle *mdb = table->entry->mdb;
int cur_pos = 0;
unsigned char marker;
MdbColumn *col;
unsigned int i;
if (idx->num_keys!=1) return;
@ -734,6 +735,7 @@ unsigned int i;
col=g_ptr_array_index(table->columns,idx->key_col_num[i]-1);
//printf("column %d coltype %d col_size %d (%d)\n",i,col->col_type, mdb_col_fixed_size(col), col->col_size);
}
*/
}
void
mdb_index_dump(MdbTableDef *table, MdbIndex *idx)

View File

@ -19,6 +19,8 @@
*/
#include "mdbsql.h"
int yylex(void);
int yyerror(char *);
MdbSQL *_mdb_sql(MdbSQL *sql)
{

View File

@ -42,9 +42,8 @@ main (int argc, char **argv)
exit (1);
}
int digit_optind = 0;
while (1) {
int this_option_optind = optind ? optind : 1;
//int this_option_optind = optind ? optind : 1;
int option_index = 0;
static struct option long_options[] = {
{"table", 1, NULL, 'T'},