gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-25-g7c2d1b7
Date: Wed, 09 Feb 2011 19:02:56 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  7c2d1b7f4e659040f79cf526063cc142bc9986d1 (commit)
      from  44881e1778eb9e056d2564105b7fb4555cc197e9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=7c2d1b7f4e659040f79cf526063cc142bc9986d1


commit 7c2d1b7f4e659040f79cf526063cc142bc9986d1
Author: Sandro Santilli <address@hidden>
Date:   Wed Feb 9 20:02:46 2011 +0100

    Fix compiler warnings

diff --git a/plugin/npapi/test.cpp b/plugin/npapi/test.cpp
index 0da95a9..026595c 100644
--- a/plugin/npapi/test.cpp
+++ b/plugin/npapi/test.cpp
@@ -38,7 +38,7 @@ std::map<NPIdentifier, NPVariant *> _properties;
 std::map<NPIdentifier,  NPInvokeFunctionPtr> _methods;
 
 int
-main(int argc, char *argv[])
+main(int , char **)
 {
     using namespace gnash; 
 
@@ -117,7 +117,7 @@ main(int argc, char *argv[])
     }
 #endif
 
-    NPObject *obj =  (NPObject *)NPN_MemAlloc(sizeof(NPObject));
+    //NPObject *obj =  (NPObject *)NPN_MemAlloc(sizeof(NPObject));
     std::string prop1 = plugin::ExternalInterface::makeString("foobar");
     std::string prop2 = plugin::ExternalInterface::makeNumber(12.34);
     std::string prop3 = plugin::ExternalInterface::makeNumber(56);
@@ -303,18 +303,19 @@ NPN_MemFree(void* ptr)
 
 // These are just stubs to get the test case to link standalone.
 NPIdentifier
-NPN_GetStringIdentifier(const NPUTF8 *name)
+NPN_GetStringIdentifier(const NPUTF8 *)
 {
+  return 0;
 }
 
 nsPluginInstanceBase *
-NS_NewPluginInstance(nsPluginCreateData * aCreateDataStruct)
+NS_NewPluginInstance(nsPluginCreateData *)
 {
   return NULL;
 }
 
 NPError
-NS_PluginGetValue(NPPVariable aVariable, void *aValue)
+NS_PluginGetValue(NPPVariable, void *)
 {
   return NPERR_INVALID_INSTANCE_ERROR;
 }
@@ -338,13 +339,13 @@ NPP_GetMIMEDescription(void)
 }
 
 void
-NS_DestroyPluginInstance(nsPluginInstanceBase *aPlugin)
+NS_DestroyPluginInstance(nsPluginInstanceBase *)
 {
 }
 
 // Implement minimal properties handling
 bool
-NPN_SetProperty(NPP npp, NPObject* obj, NPIdentifier name,
+NPN_SetProperty(NPP, NPObject*, NPIdentifier name,
                      const NPVariant *value)
 {
     _properties[name] = const_cast<NPVariant *>(value);
@@ -352,15 +353,18 @@ NPN_SetProperty(NPP npp, NPObject* obj, NPIdentifier name,
 }
 
 bool
-NPN_GetProperty(NPP npp, NPObject* obj, NPIdentifier name,
+NPN_GetProperty(NPP, NPObject* , NPIdentifier name,
                      const NPVariant *value)
 {
-    return _properties[name];
+    std::map<NPIdentifier, NPVariant *>::iterator it;
+    it = _properties.find(name);
+    if (it == _properties.end()) return false;
+    value = it->second;
+    return true;
 }
 
 bool
-NPN_HasProperty(NPP npp, NPObject* obj, NPIdentifier name,
-                     const NPVariant *value)
+NPN_HasProperty(NPP , NPObject* , NPIdentifier name)
 {
     std::map<NPIdentifier, NPVariant *>::iterator it;
     it = _properties.find(name);

-----------------------------------------------------------------------

Summary of changes:
 plugin/npapi/test.cpp |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]