Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8c68e07

Browse files
committed
Avoiding:
cc1: warnings being treated as errorsdatum.c: In function `DatumGetSize':datum.c:57: warning: unsigned value >= 0 is always 1gmake[3]: *** [datum.o] Error 1There was: if (byVal) { if (len >= 0 && len <= sizeof(Datum)) {but len has type Size (unsigned int) and so now there is: if (byVal) { if (len <= sizeof(Datum)) { size = len; } else { elog(WARN, "datumGetSize: Error: type=%ld, byVaL with len=%d", (long) type, len); } } else { /* not byValue */
1 parent9ec39eb commit8c68e07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/utils/adt/datum.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.3 1996/11/08 05:59:41 momjian Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.3.2.1 1996/12/14 07:54:22 vadim Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -54,7 +54,7 @@ datumGetSize(Datum value, Oid type, bool byVal, Size len)
5454
Sizesize=0;
5555

5656
if (byVal) {
57-
if (len>=0&&len<=sizeof(Datum)) {
57+
if (len <=sizeof(Datum)) {
5858
size=len;
5959
}else {
6060
elog(WARN,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp