[Libreoffice] [Libreoffice-commits] .: vcl/android "WaE: unused parameter 'nType'"

Stephan Bergmann sbergman at redhat.com
Tue Jan 24 23:43:28 PST 2012


On 01/25/2012 12:15 AM, Tor Lillqvist wrote:
>      WaE: unused parameter 'nType'
>
> diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
> index 91971e6..08c01ae 100644
> --- a/vcl/android/androidinst.cxx
> +++ b/vcl/android/androidinst.cxx
> @@ -68,6 +68,7 @@ void AndroidSalInstance::DoReleaseYield (int nTimeoutMS)
>
>   bool AndroidSalInstance::AnyInput( sal_uInt16 nType )
>   {
> +    (void) nType;
>       // FIXME: ideally we should check the input queue to avoid being busy ...
>       fprintf (stderr, "FIXME: AnyInput returns true\n");
>       // global_android_app->inputQueue ? ...

Just a reminder that in C++, the preferred way to silence warnings about 
legitimately unused parameters (like in this case of a virtual function 
override) is to just remove the parameter name from the function definition,

   bool AndroidSalInstance::AnyInput( sal_uInt16 )
   { ...

(see 
<http://wiki.services.openoffice.org/wiki/Writing_warning-free_code#Unused_parameters>).

Stephan


More information about the LibreOffice mailing list