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 int l = strlen(s);
466 if (nLen < l)
467 return 0;
468 for (int i = 0; i < l; i++)
469 if (tolower(pCopy[i]) != s[i]
470 && toupper(pCopy[i]) != s[i])
471 return 0;
472 aResult.isItalic = bItalic;
473 aResult.isBold = bBold;
474 nLen -= l;
475 pCopy += l;
476 return l;
477 }
Looking at git history, it's been like this since commit
16fcdbceedcdbf77e07da780581df83f38305dbd (28/04/2010)
Should line 475 simply removed or should something else be done?
Julien
--
View this message in context:
http://nabble.documentfoundation.org/Cppcheck-uselessAssignmentPtrArg-in-wrapper-cxx-sdext-module-tp4055514.html
Sent from the Dev mailing list archive at Nabble.com.
Context
- Cppcheck: uselessAssignmentPtrArg in wrapper.cxx (sdext module) · julien2412
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.