mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Remove more (void) and fix -Wall warnings.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.12 1997/07/29 15:51:33 thomas Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.13 1997/08/12 22:54:24 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -717,7 +717,7 @@ array_ref(ArrayType *array,
|
||||
if (*isNull) RETURN_NULL;
|
||||
if (VARSIZE(v) - 4 < elmlen)
|
||||
RETURN_NULL;
|
||||
(void) lo_close(fd);
|
||||
lo_close(fd);
|
||||
retval = (char *)_ArrayCast((char *)VARDATA(v), reftype, elmlen);
|
||||
if ( reftype == 0) { /* not by value */
|
||||
char * tempdata = palloc (elmlen);
|
||||
@@ -847,8 +847,8 @@ array_clip(ArrayType *array,
|
||||
_ReadArray(lowerIndx, upperIndx, len, fd, newfd, array, 1,isNull);
|
||||
}
|
||||
#ifdef LOARRAY
|
||||
(void) LOclose(fd);
|
||||
(void) LOclose(newfd);
|
||||
LOclose(fd);
|
||||
LOclose(newfd);
|
||||
#endif
|
||||
if (*isNull) {
|
||||
pfree(newArr);
|
||||
@@ -944,7 +944,7 @@ array_set(ArrayType *array,
|
||||
RETURN_NULL;
|
||||
*/
|
||||
pfree(v);
|
||||
(void) lo_close(fd);
|
||||
lo_close(fd);
|
||||
return((char *)array);
|
||||
}
|
||||
if (elmlen > 0) {
|
||||
@@ -1045,12 +1045,12 @@ array_assgn(ArrayType *array,
|
||||
return((char *)array);
|
||||
#endif
|
||||
_LOArrayRange(lowerIndx, upperIndx, len, fd, newfd, array, 1, isNull);
|
||||
(void) lo_close(newfd);
|
||||
lo_close(newfd);
|
||||
} else {
|
||||
_LOArrayRange(lowerIndx, upperIndx, len, fd, (int)ARR_DATA_PTR(newArr),
|
||||
array, 0, isNull);
|
||||
}
|
||||
(void) lo_close(fd);
|
||||
lo_close(fd);
|
||||
return ((char *) array);
|
||||
}
|
||||
_ArrayRange(lowerIndx, upperIndx, len, ARR_DATA_PTR(newArr), array, 0);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.11 1997/08/12 20:15:57 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.12 1997/08/12 22:54:26 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This code is actually (almost) unused.
|
||||
@@ -214,10 +214,10 @@ reltime2tm(int32 time, struct tm *tm)
|
||||
if (quantity > 1 || quantity < -1)
|
||||
unitnr++; /* adjust index for PLURAL of unit */
|
||||
if (quantity >= 0)
|
||||
(void) sprintf( timestring, "%c %lu %s", RELTIME_LABEL,
|
||||
sprintf( timestring, "%c %lu %s", RELTIME_LABEL,
|
||||
quantity, unit_tab[unitnr]);
|
||||
else
|
||||
(void) sprintf( timestring, "%c %lu %s %s", RELTIME_LABEL,
|
||||
sprintf( timestring, "%c %lu %s %s", RELTIME_LABEL,
|
||||
(quantity * -1), unit_tab[unitnr], RELTIME_PAST);
|
||||
return(timestring);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.13 1997/07/29 16:08:18 thomas Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.14 1997/08/12 22:54:29 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -108,7 +108,7 @@ fprintf( stderr, "single_decode- (%x) try decoding %s to %g\n", (cp-str), str, *
|
||||
|
||||
int single_encode(float8 x, char *str)
|
||||
{
|
||||
(void) sprintf(str, "%.*g", digits8, x);
|
||||
sprintf(str, "%.*g", digits8, x);
|
||||
return(TRUE);
|
||||
} /* single_encode() */
|
||||
|
||||
@@ -144,7 +144,7 @@ int pair_decode(char *str, float8 *x, float8 *y, char **s)
|
||||
|
||||
int pair_encode(float8 x, float8 y, char *str)
|
||||
{
|
||||
(void) sprintf(str, "%.*g,%.*g", digits8, x, digits8, y);
|
||||
sprintf(str, "%.*g,%.*g", digits8, x, digits8, y);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.29 1997/08/12 20:16:00 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.30 1997/08/12 22:54:32 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -53,7 +53,7 @@ GetCurrentAbsoluteTime(void)
|
||||
#else /* ! USE_POSIX_TIME */
|
||||
struct timeb tb; /* the old V7-ism */
|
||||
|
||||
(void) ftime(&tb);
|
||||
ftime(&tb);
|
||||
now = tb.time;
|
||||
#endif
|
||||
|
||||
@@ -111,7 +111,7 @@ abstime2tm(AbsoluteTime time, int *tzp, struct tm *tm, char *tzn)
|
||||
#else /* ! USE_POSIX_TIME */
|
||||
struct timeb tb; /* the old V7-ism */
|
||||
|
||||
(void) ftime(&tb);
|
||||
ftime(&tb);
|
||||
#endif
|
||||
|
||||
#ifdef USE_POSIX_TIME
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.11 1997/08/12 20:16:02 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.12 1997/08/12 22:54:34 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -142,8 +142,8 @@ ftoa(double value, char *ascii, int width, int prec1, char format)
|
||||
char fmt[256];
|
||||
int ret;
|
||||
|
||||
(void) sprintf(fmt, "%%%d.%d%c", width, prec1, format);
|
||||
(void) sprintf(out, fmt, value);
|
||||
sprintf(fmt, "%%%d.%d%c", width, prec1, format);
|
||||
sprintf(out, fmt, value);
|
||||
if ((ret = strlen(out)) > width) {
|
||||
memset(ascii, '*', width - 2);
|
||||
ascii[width] = 0;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.6 1997/08/12 20:16:04 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.7 1997/08/12 22:54:36 momjian Exp $
|
||||
*
|
||||
* Alistair Crooks added the code for the regex caching
|
||||
* agc - cached the regular expressions used - there's a good chance
|
||||
@@ -119,7 +119,7 @@ RE_compile_and_execute(struct varlena *text_re, char *text, int cflags)
|
||||
/* use malloc/free for the cre_s field because the storage
|
||||
has to persist across transactions */
|
||||
rev[oldest].cre_s = (char *) malloc(n + 1);
|
||||
(void) memmove(rev[oldest].cre_s, re, n);
|
||||
memmove(rev[oldest].cre_s, re, n);
|
||||
rev[oldest].cre_s[n] = 0;
|
||||
rev[oldest].cre_text = text_re;
|
||||
rev[oldest].cre_lru = ++lru;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.4 1997/01/10 20:19:49 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.5 1997/08/12 22:54:38 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -129,7 +129,7 @@ SetDefine(char *querystr, char *typename)
|
||||
ItemPointerCopy(&tup->t_ctid, &ipdata);
|
||||
|
||||
setheapoverride(true);
|
||||
(void) heap_replace(procrel, &ipdata, newtup);
|
||||
heap_replace(procrel, &ipdata, newtup);
|
||||
setheapoverride(false);
|
||||
|
||||
setoid = newtup->t_oid;
|
||||
|
||||
Reference in New Issue
Block a user