https://bugs.openldap.org/show_bug.cgi?id=9961
Issue ID: 9961 Summary: LMDB: -sizeof is an error because sizeof is unsigned Product: LMDB Version: 0.9.29 Hardware: All OS: Windows Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: liblmdb Assignee: bugs@openldap.org Reporter: openldap@serice.net Target Milestone: ---
MSVC++ defaults to having "SDL checks" enabled which causes -sizeof(size_t) in mdb.c to cause the following compilation error:
error C4146: unary minus operator applied to unsigned type
With "SDL checks" disabled, this is still results in a warning which can be avoided by using the following instead:
(~sizeof(size_t) + 1)
https://bugs.openldap.org/show_bug.cgi?id=9961
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Severity|normal |trivial Resolution|--- |FIXED
--- Comment #1 from Howard Chu hyc@openldap.org --- fixed in git
https://bugs.openldap.org/show_bug.cgi?id=9961
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs_review |
--- Comment #2 from Quanah Gibson-Mount quanah@openldap.org --- mdb.RE/0.9:
commit 139831a5c0665918cca16730bde0eb697c1f6c34 Author: Howard Chu hyc@openldap.org Date: Tue Nov 15 15:33:48 2022 +0000
ITS#9916 liblmdb: use alternate MDB_page2 struct for some accesses
fakepage pointers are only guaranteed to be 2-byte aligned. Use a 2-byte aligned struct definition when referencing 2-byte page members if a page pointer possibly points to a fakepage.
https://bugs.openldap.org/show_bug.cgi?id=9961
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |0.9.30