openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Lewis <truck...@apache.org>
Subject Re: compiler warnings when building OpenOffice
Date Fri, 02 Sep 2016 00:05:02 GMT
On  1 Sep, To: Don Lewis wrote:

> One of the -Wunused-parameter warnings led me to this questionable bit
> of code in filter/source/xsltfilter/containerhelper.hxx:
> 
>         template<typename FuncType, typename ParamType>
>         inline void forEachMem(FuncType pFunc, ParamType aParam) const
>         {
>                 forEach( ::boost::bind(pFunc, _1, aParam));
>         }
> 
>         template<typename FuncType, typename ParamType1, typename ParamType2>
>         inline void forEachMem(FuncType pFunc, ParamType1 aParam1, ParamType2 aParam2)
const
>         {
>                 forEach( ::boost::bind(pFunc, -1, aParam1, aParam2 ));
>         }
>  
>         template<typename FuncType, typename ParamType1, typename ParamType2, typename
ParamType3>
>         inline void forEachMem( FuncType pFunc, ParamType1 aParam1, ParamType2 aParam2,
ParamType3 aParam3 ) const
>         {
>                 forEach( ::boost::bind(pFunc, _1, aParam2, aParam2, aParam3 ));
>         }
> 
> In the three parameter version of this code, it looks like aParam1
> should be used instead of using aParam2 twice.  Also, in the two
> parameter version of the code, it looks like _1 should be used instead
> of -1.  I haven't had a chance to investigate the possible symptoms of
> these errors or how to text the appropriate fix.

The answer is that the code in question does not appear to be used. Only
the version that doesn't take any parameters (not shown above) is used
in the filter module.

There are also copies of this code in the oox module that appear to be
correct.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Mime
View raw message