]> granicus.if.org Git - postgresql/commitdiff
Fix bogus assumption that sizeof() produces an int-sized result.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 20 Jun 2005 00:32:22 +0000 (00:32 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 20 Jun 2005 00:32:22 +0000 (00:32 +0000)
contrib/tsearch2/gistidx.c

index de76b059cb6d68384c0b1824beffbf586a5ad6cf..d8a7210591dd239cdf00098a67a5104e9e7d39ef 100644 (file)
@@ -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);