Bug 787971 - Fix warnings about function pointers in gtk2 webapprt; r=glandium

This commit is contained in:
Ms2ger 2012-09-06 09:25:05 +02:00
parent d653d11db3
commit 0744280d18
2 changed files with 13 additions and 10 deletions

View File

@ -6,6 +6,7 @@ DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
FAIL_ON_WARNINGS := 1
include $(DEPTH)/config/autoconf.mk
@ -14,10 +15,12 @@ PROGRAM = webapprt-stub
CPPSRCS = webapprt.cpp
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build
LOCAL_INCLUDES += -I$(DEPTH)/build
LOCAL_INCLUDES += \
-I$(topsrcdir)/toolkit/xre \
-I$(topsrcdir)/xpcom/base \
-I$(topsrcdir)/xpcom/build \
-I$(DEPTH)/build \
$(NULL)
DEFINES += -DXPCOM_GLUE
STL_FLAGS=

View File

@ -272,9 +272,9 @@ void RemoveApplication(nsINIParser& parser, const char* curExeDir, const char* p
* four in libnotify.so.1.
* Passing the fourth argument as NULL is binary compatible.
*/
typedef void (*notify_init_t)(char*);
typedef void* (*notify_notification_new_t)(char*, char*, char*, char*);
typedef void (*notify_notification_show_t)(void*, char*);
typedef void (*notify_init_t)(const char*);
typedef void* (*notify_notification_new_t)(const char*, const char*, const char*, const char*);
typedef void (*notify_notification_show_t)(void*, void**);
void *handle = dlopen("libnotify.so.4", RTLD_LAZY);
if (!handle) {
@ -283,9 +283,9 @@ void RemoveApplication(nsINIParser& parser, const char* curExeDir, const char* p
return;
}
notify_init_t nn_init = (notify_init_t)dlsym(handle, "notify_init");
notify_notification_new_t nn_new = (notify_notification_new_t)dlsym(handle, "notify_notification_new");
notify_notification_show_t nn_show = (notify_notification_show_t)dlsym(handle, "notify_notification_show");
notify_init_t nn_init = (notify_init_t)(uintptr_t)dlsym(handle, "notify_init");
notify_notification_new_t nn_new = (notify_notification_new_t)(uintptr_t)dlsym(handle, "notify_notification_new");
notify_notification_show_t nn_show = (notify_notification_show_t)(uintptr_t)dlsym(handle, "notify_notification_show");
if (!nn_init || !nn_new || !nn_show) {
dlclose(handle);
return;