-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
In nx-X11/lib/X11 we get several of these warnings. And it is unclear how to fix them in clean manner. Upstream has exactly the same code here. So either they are not using -Wpedantic or they don't care.
Here's a link with a possible solution but this way out code will differ from upstream: http://stackoverflow.com/questions/36384195/how-to-correctly-assign-a-pointer-returned-by-dlsym-into-a-variable-of-function
CrGlCur.c: In function ‘_XTryShapeCursor’:
CrGlCur.c:158:19: warning: ISO C forbids conversion of object pointer to function pointer type [-Wpedantic]
staticFunc = (type) fetch_symbol (_XcursorModule, "_" name); \
^
CrGlCur.c:175:5: note: in expansion of macro ‘GetFunc’
GetFunc (TryShapeCursorFunc, "XcursorTryShapeCursor", func);
^
CrGlCur.c: In function ‘_XNoticeCreateBitmap’:
CrGlCur.c:158:19: warning: ISO C forbids conversion of object pointer to function pointer type [-Wpedantic]
staticFunc = (type) fetch_symbol (_XcursorModule, "_" name); \
^
CrGlCur.c:190:5: note: in expansion of macro ‘GetFunc’
GetFunc (NoticeCreateBitmapFunc, "XcursorNoticeCreateBitmap", func);
^
CrGlCur.c: In function ‘_XNoticePutBitmap’:
CrGlCur.c:158:19: warning: ISO C forbids conversion of object pointer to function pointer type [-Wpedantic]
staticFunc = (type) fetch_symbol (_XcursorModule, "_" name); \
^
CrGlCur.c:202:5: note: in expansion of macro ‘GetFunc’
GetFunc (NoticePutBitmapFunc, "XcursorNoticePutBitmap", func);
^
CrGlCur.c: In function ‘_XTryShapeBitmapCursor’:
CrGlCur.c:158:19: warning: ISO C forbids conversion of object pointer to function pointer type [-Wpedantic]
staticFunc = (type) fetch_symbol (_XcursorModule, "_" name); \
^
CrGlCur.c:218:5: note: in expansion of macro ‘GetFunc’
GetFunc (TryShapeBitmapCursorFunc, "XcursorTryShapeBitmapCursor", func);
^