Silence nbtree.h cpluspluscheck warning.
authorPeter Geoghegan <pg@bowt.ie>
Mon, 2 Mar 2020 18:29:30 +0000 (10:29 -0800)
committerPeter Geoghegan <pg@bowt.ie>
Mon, 2 Mar 2020 18:29:30 +0000 (10:29 -0800)
Add a cast to size_t to silence "comparison between signed and unsigned
integer expressions" cpluspluscheck warning.

Reported-By: Tom Lane
Discussion: https://postgr.es/m/7971.1583171266@sss.pgh.pa.us

src/include/access/nbtree.h

index bfe49f46b08daddff1af8f59f33c0be71ab015f8..84a7e80e24b248deac4a31042f0ecb5fca5c3eba 100644 (file)
@@ -381,7 +381,7 @@ static inline void
 BTreeTupleSetPosting(IndexTuple itup, int nhtids, int postingoffset)
 {
        Assert(nhtids > 1 && (nhtids & BT_OFFSET_MASK) == nhtids);
-       Assert(postingoffset == MAXALIGN(postingoffset));
+       Assert((size_t) postingoffset == MAXALIGN(postingoffset));
        Assert(postingoffset < INDEX_SIZE_MASK);
 
        itup->t_info |= INDEX_ALT_TID_MASK;