mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-10 05:47:04 +00:00
Bug 563200 fix deprecated conversion and comparison between signed and unsigned in testplugin/nptest.cpp. r=jst
--HG-- extra : rebase_source : 79958d664a02ad215198770a0c979b21ba3fca24
This commit is contained in:
parent
e51a8fe143
commit
449707a88b
@ -63,6 +63,10 @@
|
||||
#define STATIC_ASSERT(condition) \
|
||||
extern void np_static_assert(int arg[(condition) ? 1 : -1])
|
||||
|
||||
static char sPluginName[] = PLUGIN_NAME;
|
||||
static char sPluginDescription[] = PLUGIN_DESCRIPTION;
|
||||
static char sPluginVersion[] = PLUGIN_VERSION;
|
||||
|
||||
//
|
||||
// Intentional crash
|
||||
//
|
||||
@ -531,17 +535,19 @@ bool scriptableConstruct(NPObject* npobj, const NPVariant* args, uint32_t argCou
|
||||
NP_EXPORT(char*)
|
||||
NP_GetPluginVersion()
|
||||
{
|
||||
return PLUGIN_VERSION;
|
||||
return sPluginVersion;
|
||||
}
|
||||
#endif
|
||||
|
||||
static char sMimeDescription[] = "application/x-test:tst:Test mimetype";
|
||||
|
||||
#if defined(XP_UNIX)
|
||||
NP_EXPORT(char*) NP_GetMIMEDescription()
|
||||
#elif defined(XP_WIN) || defined(XP_OS2)
|
||||
char* NP_GetMIMEDescription()
|
||||
#endif
|
||||
{
|
||||
return "application/x-test:tst:Test mimetype";
|
||||
return sMimeDescription;
|
||||
}
|
||||
|
||||
#ifdef XP_UNIX
|
||||
@ -549,10 +555,10 @@ NP_EXPORT(NPError)
|
||||
NP_GetValue(void* future, NPPVariable aVariable, void* aValue) {
|
||||
switch (aVariable) {
|
||||
case NPPVpluginNameString:
|
||||
*((char**)aValue) = PLUGIN_NAME;
|
||||
*((char**)aValue) = sPluginName;
|
||||
break;
|
||||
case NPPVpluginDescriptionString:
|
||||
*((char**)aValue) = PLUGIN_DESCRIPTION;
|
||||
*((char**)aValue) = sPluginDescription;
|
||||
break;
|
||||
default:
|
||||
return NPERR_INVALID_PARAM;
|
||||
@ -593,7 +599,7 @@ NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs)
|
||||
|
||||
initializeIdentifiers();
|
||||
|
||||
for (int i = 0; i < ARRAY_LENGTH(sPluginPropertyValues); i++) {
|
||||
for (unsigned int i = 0; i < ARRAY_LENGTH(sPluginPropertyValues); i++) {
|
||||
VOID_TO_NPVARIANT(sPluginPropertyValues[i]);
|
||||
}
|
||||
|
||||
@ -639,7 +645,7 @@ NPError OSCALL NP_Shutdown()
|
||||
{
|
||||
clearIdentifiers();
|
||||
|
||||
for (int i = 0; i < ARRAY_LENGTH(sPluginPropertyValues); i++) {
|
||||
for (unsigned int i = 0; i < ARRAY_LENGTH(sPluginPropertyValues); i++) {
|
||||
NPN_ReleaseVariantValue(&sPluginPropertyValues[i]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user