summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2005-06-20 00:32:22 +0000
committerTom Lane2005-06-20 00:32:22 +0000
commit368739dca8b532177815397f134818435bafc0c6 (patch)
tree4adf53947e04089abfb484498a047a57307b8645
parent577247b023c29eba0f30711934caabaadcabef23 (diff)
Fix bogus assumption that sizeof() produces an int-sized result.
-rw-r--r--contrib/tsearch2/gistidx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/tsearch2/gistidx.c b/contrib/tsearch2/gistidx.c
index de76b059cb6..d8a7210591d 100644
--- a/contrib/tsearch2/gistidx.c
+++ b/contrib/tsearch2/gistidx.c
@@ -82,10 +82,10 @@ gtsvector_out(PG_FUNCTION_ARGS)
outbuf = palloc( outbuf_maxlen );
if ( ISARRKEY(key) )
- sprintf( outbuf, ARROUTSTR, ARRNELEM(key) );
+ sprintf( outbuf, ARROUTSTR, (int) ARRNELEM(key) );
else {
int cnttrue = ( ISALLTRUE(key) ) ? SIGLENBIT : sizebitvec(GETSIGN(key));
- sprintf( outbuf, SINGOUTSTR, cnttrue, SIGLENBIT - cnttrue );
+ sprintf( outbuf, SINGOUTSTR, cnttrue, (int) SIGLENBIT - cnttrue );
}
PG_FREE_IF_COPY(key,0);