Commit 95874fa0 authored by Marc G. Fournier's avatar Marc G. Fournier

-Wall cleanup of gist subdirectory:

	- cleaned out unused variables
	- added missing prototype headers

One outstanding -Werror failure:

/home/staff/scrappy/postgres/2.0/cvs/postgres95/src/backend/access/gist/giststra
t.c:117: warning: missing braces around initializer for `GISTEvaluationData.expr
ession'
parent 8325d9fc
...@@ -56,6 +56,8 @@ ...@@ -56,6 +56,8 @@
#include "nodes/memnodes.h" #include "nodes/memnodes.h"
#include "nodes/execnodes.h" #include "nodes/execnodes.h"
#include <stdio.h>
#include "storage/ipc.h"
#include "storage/bufmgr.h" #include "storage/bufmgr.h"
#include "catalog/pg_index.h" #include "catalog/pg_index.h"
...@@ -66,11 +68,31 @@ ...@@ -66,11 +68,31 @@
#include "nodes/parsenodes.h" #include "nodes/parsenodes.h"
#include "tcop/dest.h" #include "tcop/dest.h"
#include "executor/execdesc.h" #include "executor/execdesc.h"
#include <stdio.h>
#include "executor/executor.h" #include "executor/executor.h"
#include "access/heapam.h" #include "access/heapam.h"
#include "storage/spin.h"
#include "utils/hsearch.h"
#include "storage/shmem.h"
#include "storage/lock.h"
#include "storage/lmgr.h"
#include "utils/palloc.h"
#include "catalog/index.h"
#include "access/genam.h"
#include <string.h>
#ifndef HAVE_MEMMOVE
# include "regex/utils.h"
#endif
#include "access/gistscan.h"
#include "fmgr.h"
/* non-export function prototypes */ /* non-export function prototypes */
static InsertIndexResult gistdoinsert(Relation r, IndexTuple itup, static InsertIndexResult gistdoinsert(Relation r, IndexTuple itup,
GISTSTATE *GISTstate); GISTSTATE *GISTstate);
...@@ -404,11 +426,10 @@ gistdoinsert(Relation r, ...@@ -404,11 +426,10 @@ gistdoinsert(Relation r,
IndexTuple itup, /* itup contains compressed entry */ IndexTuple itup, /* itup contains compressed entry */
GISTSTATE *giststate) GISTSTATE *giststate)
{ {
char *datum, *newdatum; GISTENTRY tmpdentry;
GISTENTRY entry, tmpdentry;
InsertIndexResult res; InsertIndexResult res;
OffsetNumber l; OffsetNumber l;
GISTSTACK *stack, *tmpstk; GISTSTACK *stack;
Buffer buffer; Buffer buffer;
BlockNumber blk; BlockNumber blk;
Page page; Page page;
...@@ -519,7 +540,7 @@ gistAdjustKeys(Relation r, ...@@ -519,7 +540,7 @@ gistAdjustKeys(Relation r,
Buffer b; Buffer b;
bool result; bool result;
bytea *evec; bytea *evec;
GISTENTRY centry, *ev0p, *ev1p, *dentryp; GISTENTRY centry, *ev0p, *ev1p;
int size, datumsize; int size, datumsize;
IndexTuple tid; IndexTuple tid;
...@@ -648,7 +669,6 @@ gistSplit(Relation r, ...@@ -648,7 +669,6 @@ gistSplit(Relation r,
bool *decompvec; bool *decompvec;
IndexTuple item_1; IndexTuple item_1;
GISTENTRY tmpdentry, tmpentry; GISTENTRY tmpdentry, tmpentry;
char *datum;
isnull = (char *) palloc(r->rd_rel->relnatts); isnull = (char *) palloc(r->rd_rel->relnatts);
for (blank = 0; blank < r->rd_rel->relnatts; blank++) for (blank = 0; blank < r->rd_rel->relnatts; blank++)
...@@ -850,9 +870,6 @@ gistintinsert(Relation r, ...@@ -850,9 +870,6 @@ gistintinsert(Relation r,
IndexTuple rtup, /* entry for new page */ IndexTuple rtup, /* entry for new page */
GISTSTATE *giststate) GISTSTATE *giststate)
{ {
IndexTuple old;
Buffer b;
Page p;
ItemPointerData ltid; ItemPointerData ltid;
if (stk == (GISTSTACK *) NULL) { if (stk == (GISTSTACK *) NULL) {
...@@ -877,10 +894,6 @@ gistentryinserttwo(Relation r, GISTSTACK *stk, IndexTuple ltup, ...@@ -877,10 +894,6 @@ gistentryinserttwo(Relation r, GISTSTACK *stk, IndexTuple ltup,
Buffer b; Buffer b;
Page p; Page p;
InsertIndexResult res; InsertIndexResult res;
OffsetNumber off;
bytea *evec;
char *datum;
int size;
GISTENTRY tmpentry; GISTENTRY tmpentry;
IndexTuple newtup; IndexTuple newtup;
...@@ -919,9 +932,6 @@ gistentryinsert(Relation r, GISTSTACK *stk, IndexTuple tup, ...@@ -919,9 +932,6 @@ gistentryinsert(Relation r, GISTSTACK *stk, IndexTuple tup,
Buffer b; Buffer b;
Page p; Page p;
InsertIndexResult res; InsertIndexResult res;
bytea *evec;
char *datum;
int size;
OffsetNumber off; OffsetNumber off;
GISTENTRY tmpentry; GISTENTRY tmpentry;
IndexTuple newtup; IndexTuple newtup;
...@@ -1009,9 +1019,9 @@ gistchoose(Relation r, Page p, IndexTuple it, /* it has compressed entry */ ...@@ -1009,9 +1019,9 @@ gistchoose(Relation r, Page p, IndexTuple it, /* it has compressed entry */
{ {
OffsetNumber maxoff; OffsetNumber maxoff;
OffsetNumber i; OffsetNumber i;
char *ud, *id; char *id;
char *datum; char *datum;
float usize, dsize; float usize;
OffsetNumber which; OffsetNumber which;
float which_grow; float which_grow;
GISTENTRY entry, identry; GISTENTRY entry, identry;
......
...@@ -47,6 +47,20 @@ ...@@ -47,6 +47,20 @@
#include "access/gist.h" #include "access/gist.h"
#include "executor/execdebug.h"
#include "utils/palloc.h"
#ifndef HAVE_MEMMOVE
# include "regex/utils.h"
#else
# include <string.h>
#endif
#include <stdio.h>
#include "storage/ipc.h"
#include "storage/bufmgr.h"
static OffsetNumber gistfindnext(IndexScanDesc s, Page p, OffsetNumber n, static OffsetNumber gistfindnext(IndexScanDesc s, Page p, OffsetNumber n,
ScanDirection dir); ScanDirection dir);
static RetrieveIndexResult gistscancache(IndexScanDesc s, ScanDirection dir); static RetrieveIndexResult gistscancache(IndexScanDesc s, ScanDirection dir);
...@@ -306,7 +320,6 @@ gistfindnext(IndexScanDesc s, Page p, OffsetNumber n, ScanDirection dir) ...@@ -306,7 +320,6 @@ gistfindnext(IndexScanDesc s, Page p, OffsetNumber n, ScanDirection dir)
char *it; char *it;
GISTPageOpaque po; GISTPageOpaque po;
GISTScanOpaque so; GISTScanOpaque so;
GISTENTRY de;
GISTSTATE *giststate; GISTSTATE *giststate;
maxoff = PageGetMaxOffsetNumber(p); maxoff = PageGetMaxOffsetNumber(p);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment