Bug 765116 - Part 2: mozglue/android: fix gcc -pedantic warnings. r=glandium

This commit is contained in:
Chris Peterson 2012-06-18 09:06:59 -07:00
Родитель d6ba4d000b
Коммит 675783dddd
3 изменённых файлов: 10 добавлений и 9 удалений

Просмотреть файл

@ -67,6 +67,7 @@ enum StartupEvent {
#define mozilla_StartupTimeline_Event(ev, z) ev,
#include "StartupTimeline.h"
#undef mozilla_StartupTimeline_Event
MAX_STARTUP_EVENT_ID
};
using namespace mozilla;
@ -704,7 +705,7 @@ loadGeckoLibs(const char *apkName)
return FAILURE;
}
#define GETFUNC(name) f_ ## name = (name ## _t) __wrap_dlsym(xul_handle, "Java_org_mozilla_gecko_GeckoAppShell_" #name)
#define GETFUNC(name) f_ ## name = (name ## _t) (uintptr_t) __wrap_dlsym(xul_handle, "Java_org_mozilla_gecko_GeckoAppShell_" #name)
GETFUNC(nativeInit);
GETFUNC(notifyGeckoOfEvent);
GETFUNC(processNextNativeEvent);
@ -741,7 +742,7 @@ loadGeckoLibs(const char *apkName)
GETFUNC(onFullScreenPluginHidden);
GETFUNC(getNextMessageFromQueue);
#undef GETFUNC
sStartupTimeline = (uint64_t *)__wrap_dlsym(xul_handle, "_ZN7mozilla15StartupTimeline16sStartupTimelineE");
sStartupTimeline = (uint64_t *) (uintptr_t) __wrap_dlsym(xul_handle, "_ZN7mozilla15StartupTimeline16sStartupTimelineE");
gettimeofday(&t1, 0);
struct rusage usage2;
getrusage(RUSAGE_THREAD, &usage2);
@ -957,7 +958,7 @@ typedef void (*GeckoStart_t)(void *, const nsXREAppData *);
extern "C" NS_EXPORT void JNICALL
Java_org_mozilla_gecko_GeckoAppShell_nativeRun(JNIEnv *jenv, jclass jc, jstring jargs)
{
GeckoStart_t GeckoStart = (GeckoStart_t) __wrap_dlsym(xul_handle, "GeckoStart");
GeckoStart_t GeckoStart = (GeckoStart_t) (uintptr_t) __wrap_dlsym(xul_handle, "GeckoStart");
if (GeckoStart == NULL)
return;
// XXX: java doesn't give us true UTF8, we should figure out something
@ -1004,9 +1005,9 @@ ChildProcessInit(int argc, char* argv[])
typedef GeckoProcessType (*XRE_StringToChildProcessType_t)(char*);
typedef mozglueresult (*XRE_InitChildProcess_t)(int, char**, GeckoProcessType);
XRE_StringToChildProcessType_t fXRE_StringToChildProcessType =
(XRE_StringToChildProcessType_t)__wrap_dlsym(xul_handle, "XRE_StringToChildProcessType");
(XRE_StringToChildProcessType_t) (uintptr_t) __wrap_dlsym(xul_handle, "XRE_StringToChildProcessType");
XRE_InitChildProcess_t fXRE_InitChildProcess =
(XRE_InitChildProcess_t)__wrap_dlsym(xul_handle, "XRE_InitChildProcess");
(XRE_InitChildProcess_t) (uintptr_t) __wrap_dlsym(xul_handle, "XRE_InitChildProcess");
GeckoProcessType proctype = fXRE_StringToChildProcessType(argv[--argc]);

Просмотреть файл

@ -48,7 +48,7 @@ setup_nss_functions(void *nss_handle,
LOG("Missing handle\n");
return FAILURE;
}
#define GETFUNC(name) f_ ## name = (name ## _t) __wrap_dlsym(nss_handle, #name); \
#define GETFUNC(name) f_ ## name = (name ## _t) (uintptr_t) __wrap_dlsym(nss_handle, #name); \
if (!f_ ##name) return FAILURE;
GETFUNC(NSS_Initialize);
GETFUNC(NSS_Shutdown);
@ -59,13 +59,13 @@ setup_nss_functions(void *nss_handle,
GETFUNC(PK11_InitPin);
GETFUNC(SECITEM_ZfreeItem);
#undef GETFUNC
#define NSPRFUNC(name) f_ ## name = (name ## _t) __wrap_dlsym(nspr_handle, #name); \
#define NSPRFUNC(name) f_ ## name = (name ## _t) (uintptr_t) __wrap_dlsym(nspr_handle, #name); \
if (!f_ ##name) return FAILURE;
NSPRFUNC(PR_ErrorToString);
NSPRFUNC(PR_GetError);
NSPRFUNC(PR_Free);
#undef NSPRFUNC
#define PLCFUNC(name) f_ ## name = (name ## _t) __wrap_dlsym(plc_handle, #name); \
#define PLCFUNC(name) f_ ## name = (name ## _t) (uintptr_t) __wrap_dlsym(plc_handle, #name); \
if (!f_ ##name) return FAILURE;
PLCFUNC(PL_Base64Encode);
PLCFUNC(PL_Base64Decode);

Просмотреть файл

@ -40,7 +40,7 @@ SQLITE_WRAPPER_INT(sqlite3_last_insert_rowid)
void setup_sqlite_functions(void *sqlite_handle)
{
#define GETFUNC(name) f_ ## name = (name ## _t) __wrap_dlsym(sqlite_handle, #name)
#define GETFUNC(name) f_ ## name = (name ## _t) (uintptr_t) __wrap_dlsym(sqlite_handle, #name)
GETFUNC(sqlite3_open);
GETFUNC(sqlite3_errmsg);
GETFUNC(sqlite3_prepare_v2);