Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 706754c

Browse files
committed
Compute max and min int8 values using unsigned arithmetic, in hopes of
suppressing Sun Studio compiler warnings. Per Stefan.
1 parent 72c7bad commit 706754c

File tree

1 file changed

+3
-3
lines changed
  • src/backend/utils/adt

1 file changed

+3
-3
lines changed

src/backend/utils/adt/xml.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.44 2007/06/06 23:00:39 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.45 2007/07/12 21:04:45 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -2806,8 +2806,8 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod)
28062806
" <xsd:maxInclusive value=\"" INT64_FORMAT "\"/>\n"
28072807
" <xsd:minInclusive value=\"" INT64_FORMAT "\"/>\n"
28082808
" </xsd:restriction>\n",
2809-
-((INT64CONST(1) << (sizeof(int64) * 8 - 1)) + 1),
2810-
(INT64CONST(1) << (sizeof(int64) * 8 - 1)));
2809+
(((uint64) 1) << (sizeof(int64) * 8 - 1)) - 1,
2810+
(((uint64) 1) << (sizeof(int64) * 8 - 1)));
28112811
break;
28122812

28132813
case FLOAT4OID:

0 commit comments

Comments
 (0)