Cppcheck: uselessAssignmentPtrArg in wrapper.cxx (sdext module)
Caolán McNamara
caolanm at redhat.com
Thu May 16 06:58:09 PDT 2013
On Sun, 2013-05-12 at 09:28 -0700, julien2412 wrote:
> A bunch of similar warnings here:
> <error file="basic/source/sbx/sbxbyte.cxx" line="215"
> These always have part like this:
> 491 ref:
> 492 aTmp.eType = SbxDataType( p->eType & 0x0FFF );
> 493 p = &aTmp; goto start;
> whereas the function is like this:
> sal_Int64 ImpGetInt64( const SbxValues* p )
I think its simply the case that the goto confuses cppcheck, at start:
the p is used, so its not actually a useless assignment. Although its
pretty hairy stuff.
> <error file="rsc/source/rscpp/cpp5.c" line="643"
> id="uselessAssignmentPtrArg" severity="style" msg="Assignment of function
> parameter has no effect outside the function."/>
> This one is a bit different, we have this:
> c = cget();
Yeah, that c is actually unused, so that line can be...
- c = cget();
+ cget();
C.
More information about the LibreOffice
mailing list