diff --git a/contrib/tsearch2/query_gist.c b/contrib/tsearch2/query_gist.c
index 630d3e4e00f941e6b2fb5401001c5c395a6f641e..34bbf371975b86ae2b3b6b2f0b843dc1e8d36a45 100644
--- a/contrib/tsearch2/query_gist.c
+++ b/contrib/tsearch2/query_gist.c
@@ -200,6 +200,8 @@ sizebitvec(TPQTGist sign) {
 
 	for(i=0;i<64;i++) 
 		size += 0x01 & (sign>>i);
+
+	return size;
 }
 
 static int