I just pushed this, after some more minor tweaks. Thanks, and please do continue testing!
Here's another small fix for some unused variable warnings. Unfortunately this Microsoft compiler that I'm using does not know about __attribute__((unused)), so some warnings are generated for these:
BrinTuple *tmptup PG_USED_FOR_ASSERTS_ONLY;
BrinMemTuple *tmpdtup PG_USED_FOR_ASSERTS_ONLY;
Size tmpsiz PG_USED_FOR_ASSERTS_ONLY;
The attached patch moves these into within the #ifdef USE_ASSERT_CHECKING section.
I know someone will ask so, let me explain: The reason I don't see a bunch of other warnings for PG_USED_FOR_ASSERTS_ONLY vars when compiling without assert checks, is that this Microsoft compiler seems to be ok with variables being assigned values and the values never being used, but if the variable is never assigned a value, then it'll warn you of that.