Hallvard B Furuseth wrote:
[EMAIL PROTECTED] 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.
--
  -- Howard Chu
  Chief Architect, Symas Corp.  http://www.symas.com
  Director, Highland Sun        http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP     http://www.openldap.org/project/

Reply via email to