From 368739dca8b532177815397f134818435bafc0c6 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 20 Jun 2005 00:32:22 +0000 Subject: [PATCH] Fix bogus assumption that sizeof() produces an int-sized result. --- contrib/tsearch2/gistidx.c | 4 ++-- 1 file 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); -- 2.39.5