[PATCH] Clang-flagged error typedef for CardPropertyGetter/Setter in connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx

Khoo Wei Ming weimzz at gmail.com
Sat Feb 18 01:41:01 PST 2012

clang flags this as

error: cannot initialize a member subobject of type
'CardPropertyGetter' (aka 'nsresult (nsIAbCard::*)(PRUnichar **)')
with an rvalue of type 'nsresult (nsIAbCard::*)(PRUnichar **)
                    { "FirstName",          "givenname",

I did a grep for NS_STDCALL and chanced upon this comment in

 * Macro for creating typedefs for pointer-to-member types which are
 * declared with stdcall.  It is important to use this for any type which is
 * declared as stdcall (i.e. NS_IMETHOD).  For example, instead of writing:
 *  typedef nsresult (nsIFoo::*someType)(nsISupports* arg);
 *  you should write:
 *  typedef
 *  NS_STDCALL_FUNCPROTO(nsresult, someType, nsIFoo, typeFunc, (nsISupports*));

Hopefully the patch is correct. I didn't try building in with gcc, but
clang seems to be pleased..

Wei Ming
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Clang-flagged-error-for-typedef-CardPropertyGetter.patch
Type: text/x-patch
Size: 1360 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120218/72615b09/attachment.bin>

More information about the LibreOffice mailing list