latest commit breaks tsearch2

Started by Tom Laneover 20 years ago3 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

query_gist.c: In function `sizebitvec':
query_gist.c:203: warning: control reaches end of non-void function

Looking at the code, gcc is right to complain --- if this is working for
you it's only accidental. I don't much care for the hard-wired
assumption about the size of TPQTGist either ...

regards, tom lane

#2Teodor Sigaev
teodor@sigaev.ru
In reply to: Tom Lane (#1)
Re: latest commit breaks tsearch2

query_gist.c: In function `sizebitvec':
query_gist.c:203: warning: control reaches end of non-void function

Fixed

Looking at the code, gcc is right to complain --- if this is working for
you it's only accidental.

It works because index tree was correct but was very far from optimal.

I don't much care for the hard-wired
assumption about the size of TPQTGist either ...

typedef uint64 TPQTGist;

What is your doubt? You suggest to use sizeof(TPQTGist)*BIT_PER_BYTE?

--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Teodor Sigaev (#2)
Re: latest commit breaks tsearch2

Teodor Sigaev <teodor@sigaev.ru> writes:

I don't much care for the hard-wired
assumption about the size of TPQTGist either ...

typedef uint64 TPQTGist;

What is your doubt? You suggest to use sizeof(TPQTGist)*BIT_PER_BYTE?

Yeah. It'll make the code easier to adapt to a machine without any
native int64 type.

regards, tom lane