Hallvard B Furuseth wrote:
hyc@OpenLDAP.org writes:
lber_pvt.h 1.39 -> 1.40 Silence BER_BVC warning
-#define BER_BVC(s) { STRLENOF(s), (s) } +#define BER_BVC(s) { STRLENOF(s), (char *)(s) }
Is this a "cast away const"?
Yes.
It also removes warnings about genuine type errors.
If it's just for a few cases, how about adding a BER_BVCC macro which takes a const char[] instead? Or if it's for C++, that can use const_cast<char *>(s).
OK, either of those would be fine if you want to revert this checkin. Though we shouldn't use any C++ syntax in these headers.