mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Fix a bunch of minor portability problems and maybe-bugs revealed by
running gcc and HP's cc with warnings cranked way up. Signed vs unsigned comparisons, routines declared static and then defined not-static, that kind of thing. Tedious, but perhaps useful...
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portalbuf.c,v 1.22 2000/01/26 05:56:29 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portalbuf.c,v 1.23 2000/03/17 02:36:08 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -90,7 +90,7 @@ portals_realloc(size_t size)
|
||||
libpq_raise(&PortalError,
|
||||
vararg_format("Cannot alloc more memory in portals_realloc"));
|
||||
|
||||
for (i = oldsize; i < portals_array_size; i++)
|
||||
for (i = oldsize; i < (int) portals_array_size; i++)
|
||||
portals[i] = (PortalEntry *) NULL;
|
||||
|
||||
}
|
||||
@@ -365,7 +365,7 @@ pbuf_getIndex(char *pname)
|
||||
|
||||
if (portals)
|
||||
{
|
||||
for (i = 0; i < portals_array_size; i++)
|
||||
for (i = 0; i < (int) portals_array_size; i++)
|
||||
if (portals[i] != NULL &&
|
||||
strncmp(portals[i]->name, pname, PortalNameLength) == 0)
|
||||
return i;
|
||||
@@ -407,12 +407,12 @@ pbuf_setup(char *pname)
|
||||
pbuf_freePortal(portals[i]->portal);
|
||||
else
|
||||
{
|
||||
for (i = 0; i < portals_array_size; i++)
|
||||
for (i = 0; i < (int) portals_array_size; i++)
|
||||
if (portals[i] == NULL)
|
||||
break;
|
||||
|
||||
/* If the portal table is full, enlarge it */
|
||||
if (i >= portals_array_size)
|
||||
if (i >= (int) portals_array_size)
|
||||
portals_realloc(PORTALS_GROW_BY);
|
||||
|
||||
portals[i] = pbuf_addEntry();
|
||||
|
||||
Reference in New Issue
Block a user