Re: Cppcheck: uselessAssignmentPtrArg in wrapper.cxx (sdext module)

2013-06-14 Thread Caolán McNamara
On Thu, 2013-05-16 at 22:23 +0200, Julien Nabet wrote: > Any idea for initial post (sdext/source/pdfimport/wrapper/wrapper.cxx, > line 475) ? Well, this code was a refactor that happened in 16fcdbceedcdbf77e07da780581df83f38305dbd and its definitely wrong in one way or the other. Either the pCop

Re: Cppcheck: uselessAssignmentPtrArg in wrapper.cxx (sdext module)

2013-05-16 Thread Julien Nabet
On 16/05/2013 15:58, Caolán McNamara wrote: On Sun, 2013-05-12 at 09:28 -0700, julien2412 wrote: ... 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. As usual, you're absolutely right!

Re: Cppcheck: uselessAssignmentPtrArg in wrapper.cxx (sdext module)

2013-05-16 Thread Caolán McNamara
On Sun, 2013-05-12 at 09:28 -0700, julien2412 wrote: > A bunch of similar warnings here: > 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:

Re: Cppcheck: uselessAssignmentPtrArg in wrapper.cxx (sdext module)

2013-05-12 Thread julien2412
A bunch of similar warnings here: 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 ) This on

Cppcheck: uselessAssignmentPtrArg in wrapper.cxx (sdext module)

2013-05-12 Thread julien2412
Hello, Cppcheck reported this an useless assignment in sdext/source/pdfimport/wrapper/wrapper.cxx, line 475 462 int Parser::parseFontCheckForString( const sal_Unicode* pCopy, const char* s, sal_Int32& nLen, 463 FontAttributes& aResult, bool bItalic, bool bBold) 464 { 465