Reduce compiler warnings in plugin test.cpp
commit857a707592d755dad877af81451ab5b0f83469c9
authorPetter Reinholdtsen <pere@hungry.com>
Wed, 24 Nov 2010 13:24:44 +0000 (24 14:24 +0100)
committerSandro Santilli <strk@keybit.net>
Wed, 24 Nov 2010 15:13:38 +0000 (24 16:13 +0100)
tree7178adc9b323efade6502e23c878120637d5081d
parent2bd76b9be1c16d1f70b2315a818130c187830a48
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 <strk@keybit.net>
plugin/npapi/test.cpp