index f89769f37937448858ae44d5982536b29c5fb38b..f08221eed3c9a8105b497f3ce890af21037e905b 100644 (file)
@@ -736,7 +736,7 @@ expand_tuple(HeapTuple *targetHeapTuple,
{
AttrMissing *attrmiss = NULL;
int attnum;
- int firstmissingnum = 0;
+ int firstmissingnum;
bool hasNulls = HeapTupleHasNulls(sourceTuple);
HeapTupleHeader targetTHeader;
HeapTupleHeader sourceTHeader = sourceTuple->t_data;
index bfda7fbe3d586110094e0bf6f6678de2407b96b9..0516059e3ddc9d6b7705e6eb3f580e1054f863b7 100644 (file)
void
gistfillbuffer(Page page, IndexTuple *itup, int len, OffsetNumber off)
{
- OffsetNumber l = InvalidOffsetNumber;
int i;
if (off == InvalidOffsetNumber)
@@ -42,6 +41,7 @@ gistfillbuffer(Page page, IndexTuple *itup, int len, OffsetNumber off)
for (i = 0; i < len; i++)
{
Size sz = IndexTupleSize(itup[i]);
+ OffsetNumber l;
l = PageAddItem(page, (Item) itup[i], sz, off, false, false);
if (l == InvalidOffsetNumber)
index 28dc196b55e3e64837532c39cc661e37bd7ff11d..1e628a33d77ecec5beba30ad06a07ae5cd5bc4bd 100644 (file)
@@ -860,7 +860,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
ScanKeyData notnullkeys[INDEX_MAX_KEYS];
int keysCount = 0;
int i;
- bool status = true;
+ bool status;
StrategyNumber strat_total;
BTScanPosItem *currItem;
BlockNumber blkno;
@@ -1858,7 +1858,7 @@ _bt_steppage(IndexScanDesc scan, ScanDirection dir)
{
BTScanOpaque so = (BTScanOpaque) scan->opaque;
BlockNumber blkno = InvalidBlockNumber;
- bool status = true;
+ bool status;
Assert(BTScanPosIsValid(so->currPos));
@@ -1967,7 +1967,7 @@ _bt_readnextpage(IndexScanDesc scan, BlockNumber blkno, ScanDirection dir)
Relation rel;
Page page;
BTPageOpaque opaque;
- bool status = true;
+ bool status;
rel = scan->indexRelation;
index 9e6e6c42d3c8372b6a8c5c0a9c0612f8c11724a0..dbbd3aa31fe14281ba5d4fedf0d777be1022116e 100644 (file)
PendingRelDelete *prev;
PendingRelDelete *next;
int nrels = 0,
- i = 0,
maxrels = 0;
SMgrRelation *srels = NULL;
{
smgrdounlinkall(srels, nrels, false);
- for (i = 0; i < nrels; i++)
+ for (int i = 0; i < nrels; i++)
smgrclose(srels[i]);
pfree(srels);
index 774b26fd2c4d22e89fc932ec08c7250e2d9262a1..cb341365df4652d0d7e00037deb1452280ffa9da 100644 (file)
asyncQueueReadAllNotifications(void)
{
volatile QueuePosition pos;
- QueuePosition oldpos;
QueuePosition head;
Snapshot snapshot;
LWLockAcquire(NotifyQueueLock, LW_SHARED);
/* Assert checks that we have a valid state entry */
Assert(MyProcPid == QUEUE_BACKEND_PID(MyBackendId));
- pos = oldpos = QUEUE_BACKEND_POS(MyBackendId);
+ pos = QUEUE_BACKEND_POS(MyBackendId);
head = QUEUE_HEAD;
LWLockRelease(NotifyQueueLock);
index a023090fbbd3d0ab2efc090d19d3086aa995dfd7..1c0cd6b2487b9468cf8929f1e7e6af11d6f448d6 100644 (file)
@@ -3433,7 +3433,6 @@ CancelDBBackends(Oid databaseid, ProcSignalReason sigmode, bool conflictPending)
{
ProcArrayStruct *arrayP = procArray;
int index;
- pid_t pid = 0;
/* tell all backends to die */
LWLockAcquire(ProcArrayLock, LW_EXCLUSIVE);
@@ -3446,6 +3445,7 @@ CancelDBBackends(Oid databaseid, ProcSignalReason sigmode, bool conflictPending)
if (databaseid == InvalidOid || proc->databaseId == databaseid)
{
VirtualTransactionId procvxid;
+ pid_t pid;
GET_VXID_FROM_PGPROC(procvxid, *proc);
index 49735bc06af8d35c29a81ae01e8a1c49c04ec733..05d08cfc0102d09492080063b2e113b24e8d8564 100644 (file)
NISortDictionary(IspellDict *Conf)
{
int i;
- int naffix = 0;
+ int naffix;
int curaffix;
/* compress affixes */
index bf9643ffb4a108462e4c4e745c7e1664cb81f1d1..7d09537d82b95caa7ca6817aafab3baafca228a9 100644 (file)
get_th(char *num, int type)
{
int len = strlen(num),
- last,
- seclast;
+ last;
last = *(num + (len - 1));
if (!isdigit((unsigned char) last))
* All "teens" (<x>1[0-9]) get 'TH/th', while <x>[02-9][123] still get
* 'ST/st', 'ND/nd', 'RD/rd', respectively
*/
- if ((len > 1) && ((seclast = num[len - 2]) == '1'))
+ if ((len > 1) && (num[len - 2] == '1'))
last = 0;
switch (last)
@@ -4932,9 +4931,9 @@ NUM_cache(int len, NUMDesc *Num, text *pars_str, bool *shouldFree)
static char *
int_to_roman(int number)
{
- int len = 0,
- num = 0;
- char *p = NULL,
+ int len,
+ num;
+ char *p,
*result,
numstr[12];
for (p = numstr; *p != '0円'; p++, --len)
{
- num = *p - 49; /* 48 ascii + 1 */
+ num = *p - ('0' + 1);
if (num < 0)
continue;
x = DatumGetNumeric(DirectFunctionCall2(numeric_round,
NumericGetDatum(value),
Int32GetDatum(0)));
- numstr = orgnum =
+ numstr =
int_to_roman(DatumGetInt32(DirectFunctionCall1(numeric_int4,
NumericGetDatum(x))));
}
* On DateType depend part (int32)
*/
if (IS_ROMAN(&Num))
- numstr = orgnum = int_to_roman(value);
+ numstr = int_to_roman(value);
else if (IS_EEEE(&Num))
{
/* we can do it easily because float8 won't lose any precision */
if (IS_ROMAN(&Num))
{
/* Currently don't support int8 conversion to roman... */
- numstr = orgnum = int_to_roman(DatumGetInt32(DirectFunctionCall1(int84, Int64GetDatum(value))));
+ numstr = int_to_roman(DatumGetInt32(DirectFunctionCall1(int84, Int64GetDatum(value))));
}
else if (IS_EEEE(&Num))
{
index c88ebfc7d4113f31debd1de995f3e637974b78c6..38b413f6ffff8a4414f3f291cd1bb1644e34bdf1 100644 (file)
@@ -857,8 +857,7 @@ calc_rank_cd(const float4 *arrdata, TSVector txt, TSQuery query, int method)
double Wdoc = 0.0;
double invws[lengthof(weights)];
double SumDist = 0.0,
- PrevExtPos = 0.0,
- CurExtPos = 0.0;
+ PrevExtPos = 0.0;
int NExtent = 0;
QueryRepresentation qr;
@@ -889,6 +888,7 @@ calc_rank_cd(const float4 *arrdata, TSVector txt, TSQuery query, int method)
{
double Cpos = 0.0;
double InvSum = 0.0;
+ double CurExtPos;
int nNoise;
DocRepresentation *ptr = ext.begin;
index 971e6adf48756dfa241c2e7783fbf8f112050ce7..77d402c323e94b02b2324ab1b359a8b35811899b 100644 (file)
size_t blkLen;
char *buf = NULL;
int buflen = 0;
- size_t cnt;
blkLen = ReadInt(AH);
while (blkLen != 0)
buf = (char *) pg_malloc(blkLen);
buflen = blkLen;
}
- if ((cnt = fread(buf, 1, blkLen, AH->FH)) != blkLen)
+ if (fread(buf, 1, blkLen, AH->FH) != blkLen)
{
if (feof(AH->FH))
fatal("could not read from input file: end of file");
static int
_WriteByte(ArchiveHandle *AH, const int i)
{
- int res;
-
- if ((res = fputc(i, AH->FH)) == EOF)
+ if (fputc(i, AH->FH) == EOF)
WRITE_ERROR_EXIT;
return 1;