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. 857a707592d755dad877


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. 857a707592d755dad877af81451ab5b0f83469c9
Date: Wed, 24 Nov 2010 15:16:04 +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  857a707592d755dad877af81451ab5b0f83469c9 (commit)
      from  2bd76b9be1c16d1f70b2315a818130c187830a48 (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=857a707592d755dad877af81451ab5b0f83469c9


commit 857a707592d755dad877af81451ab5b0f83469c9
Author: Petter Reinholdtsen <address@hidden>
Date:   Wed Nov 24 14:24:44 2010 +0100

    Reduce compiler warnings in plugin test.cpp
    
    I had a look at the compiler warnings shown when doing make check,
    more specifically these warnings:
    
    test.cpp: In function 'int main(int, char**)':
    test.cpp:120: warning: unused variable 'obj'
    test.cpp: At global scope:
    test.cpp:41: warning: unused parameter 'argc'
    test.cpp:41: warning: unused parameter 'argv'
    test.cpp: In function 'void* NPN_GetStringIdentifier(const NPUTF8*)':
    test.cpp:308: warning: no return statement in function returning non-void
    test.cpp: At global scope:
    test.cpp:306: warning: unused parameter 'name'
    test.cpp: In function 'nsPluginInstanceBase* 
NS_NewPluginInstance(nsPluginCreateData*)':
    test.cpp:313: warning: no return statement in function returning non-void
    test.cpp: At global scope:
    test.cpp:311: warning: unused parameter 'aCreateDataStruct'
    test.cpp: In function 'NPError NS_PluginGetValue(NPPVariable, void*)':
    test.cpp:318: warning: no return statement in function returning non-void
    test.cpp: At global scope:
    test.cpp:316: warning: unused parameter 'aVariable'
    test.cpp:316: warning: unused parameter 'aValue'
    test.cpp: In function 'NPError NS_PluginInitialize()':
    test.cpp:323: warning: no return statement in function returning non-void
    test.cpp: At global scope:
    test.cpp:338: warning: unused parameter 'aPlugin'
    test.cpp: In function 'bool NPN_SetProperty(NPP_t*, NPObject*, void*, const 
NPVariant*)':
    test.cpp:348: warning: no return statement in function returning non-void
    test.cpp: At global scope:
    test.cpp:344: warning: unused parameter 'npp'
    test.cpp:344: warning: unused parameter 'obj'
    test.cpp:351: warning: unused parameter 'npp'
    test.cpp:351: warning: unused parameter 'obj'
    test.cpp:351: warning: unused parameter 'value'
    test.cpp:358: warning: unused parameter 'npp'
    test.cpp:358: warning: unused parameter 'obj'
    test.cpp:358: warning: unused parameter 'value'
    test.cpp: In function 'bool NPN_HasProperty(NPP_t*, NPObject*, void*, const 
NPVariant*)':
    test.cpp:366: warning: control reaches end of non-void function
    
    I left the unused variables alone, assume someone left them around for
    a purpose, and concentrated on the non-void functions lacking return
    values instead.
    
    This patch should get rid of them.  The file have inconsistent
    indentation, so I went with the indentation used directly above the
    code I inserted.  Allmost all the functions with missing return values
    are stubs, so I did not put much effort into generating a sensible
    return value.
    
    Signed-off-by: Sandro Santilli <address@hidden>

diff --git a/plugin/npapi/test.cpp b/plugin/npapi/test.cpp
index 9a7b639..c2b5e29 100644
--- a/plugin/npapi/test.cpp
+++ b/plugin/npapi/test.cpp
@@ -310,16 +310,19 @@ NPN_GetStringIdentifier(const NPUTF8 *name)
 nsPluginInstanceBase *
 NS_NewPluginInstance(nsPluginCreateData * aCreateDataStruct)
 {
+  return NULL;
 }
 
 NPError
 NS_PluginGetValue(NPPVariable aVariable, void *aValue)
 {
+  return NPERR_INVALID_INSTANCE_ERROR;
 }
 
 NPError
 NS_PluginInitialize()
 {
+  return NPERR_INVALID_INSTANCE_ERROR;
 }
 
 void
@@ -345,6 +348,7 @@ NPN_SetProperty(NPP npp, NPObject* obj, NPIdentifier name,
                      const NPVariant *value)
 {
     _properties[name] = const_cast<NPVariant *>(value);
+    return true;
 }
 
 bool
@@ -363,6 +367,7 @@ NPN_HasProperty(NPP npp, NPObject* obj, NPIdentifier name,
     if (it != _properties.end()) {
         return true;
     }
+    return false;
 }
 
 void

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

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


hooks/post-receive
-- 
Gnash



reply via email to

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