mirror of
https://github.com/postgres/postgres.git
synced 2025-10-22 14:32:25 +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:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: itup.h,v 1.23 2000/01/26 05:57:50 momjian Exp $
|
||||
* $Id: itup.h,v 1.24 2000/03/17 02:36:37 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -82,8 +82,8 @@ typedef struct PredInfo
|
||||
#define INDEX_NULL_MASK 0x8000
|
||||
#define INDEX_VAR_MASK 0x4000
|
||||
|
||||
#define IndexTupleSize(itup) (((IndexTuple) (itup))->t_info & 0x1FFF)
|
||||
#define IndexTupleDSize(itup) ((itup).t_info & 0x1FFF)
|
||||
#define IndexTupleSize(itup) ((Size) (((IndexTuple) (itup))->t_info & 0x1FFF))
|
||||
#define IndexTupleDSize(itup) ((Size) ((itup).t_info & 0x1FFF))
|
||||
#define IndexTupleNoNulls(itup) (!(((IndexTuple) (itup))->t_info & 0x8000))
|
||||
#define IndexTupleAllFixed(itup) (!(((IndexTuple) (itup))->t_info & 0x4000))
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: tupmacs.h,v 1.13 2000/01/26 05:57:51 momjian Exp $
|
||||
* $Id: tupmacs.h,v 1.14 2000/03/17 02:36:37 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -50,13 +50,13 @@
|
||||
( \
|
||||
(*(A))->attbyval && (*(A))->attlen != -1 ? \
|
||||
( \
|
||||
(*(A))->attlen > sizeof(int16) ? \
|
||||
(*(A))->attlen > (int) sizeof(int16) ? \
|
||||
( \
|
||||
(char *) (long) *((int32 *)(T)) \
|
||||
) \
|
||||
: \
|
||||
( \
|
||||
(*(A))->attlen < sizeof(int16) ? \
|
||||
(*(A))->attlen < (int) sizeof(int16) ? \
|
||||
(char *) (long) *((char *)(T)) \
|
||||
: \
|
||||
(char *) (long) *((int16 *)(T))) \
|
||||
|
Reference in New Issue
Block a user