[Patch] Fix enum type mismatch

Поиск
Список
Период
Сортировка
Искать

[Patch] Fix enum type mismatch

От:
Zdenek Kotala <Zdenek.Kotala@Sun.COM>
Дата:
Attached patch fixed following warning:

"../../../src/include/nodes/parsenodes.h", line 487: warning: enumerator
value overflows INT_MAX (2147483647)

The reason is clear, enum is int not unsigned.

It is short fix, but I'm thinking about enum conversion to #define. We
use e.g. in the same file.

60  typedef uint32 AclMode;	/* a bitmask of privilege bits */
61
62  #define ACL_INSERT		(1<<0)	/* for relations */
63  #define ACL_SELECT		(1<<1)
64  #define ACL_UPDATE		(1<<2)
65  #define ACL_DELETE		(1<<3)
66  #define ACL_TRUNCATE	(1<<4)
67  #define ACL_REFERENCES	(1<<5)
68  #define ACL_TRIGGER		(1<<6)

	Zdenek

Re: [Patch] Fix enum type mismatch

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
FAQ