git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 77b88bd)
Silence nbtree.h cpluspluscheck warning.
Mon, 2 Mar 2020 18:29:30 +0000 (10:29 -0800)
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


diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h
index bfe49f46b08daddff1af8f59f33c0be71ab015f8..84a7e80e24b248deac4a31042f0ecb5fca5c3eba 100644 (file)
--- a/src/include/access/nbtree.h
+++ b/src/include/access/nbtree.h
@@ -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;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /