Skip to content

Commit 368739d

Browse files
committed
Fix bogus assumption that sizeof() produces an int-sized result.
1 parent 577247b commit 368739d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/tsearch2/gistidx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ gtsvector_out(PG_FUNCTION_ARGS)
8282
outbuf = palloc( outbuf_maxlen );
8383

8484
if ( ISARRKEY(key) )
85-
sprintf( outbuf, ARROUTSTR, ARRNELEM(key) );
85+
sprintf( outbuf, ARROUTSTR, (int) ARRNELEM(key) );
8686
else {
8787
int cnttrue = ( ISALLTRUE(key) ) ? SIGLENBIT : sizebitvec(GETSIGN(key));
88-
sprintf( outbuf, SINGOUTSTR, cnttrue, SIGLENBIT - cnttrue );
88+
sprintf( outbuf, SINGOUTSTR, cnttrue, (int) SIGLENBIT - cnttrue );
8989
}
9090

9191
PG_FREE_IF_COPY(key,0);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy