Cppcheck reports an assignment which isn't used in sd/source/ui/func/fupage.cxx

Ioan Radu ioan.radu.g at gmail.com
Fri Dec 28 03:37:59 PST 2012


Hello Julien,
but it is used, it is an array
*sal_uInt16 p1 = pPtr[0], p2 = pPtr[1];
  while(pPtr[2] && (pPtr[2] - p2 == 1))*


On Thu, Dec 27, 2012 at 4:43 PM, julien2412 <serval2412 at yahoo.fr> wrote:

> Hello,
>
> Cppcheck reported this:
> [sd/source/ui/func/fupage.cxx:243]: (style) Variable 'pPtr' is assigned a
> value that is never used
>
> Here are some lines:
>     236     const sal_uInt16* pPtr = aNewAttr.GetRanges();
>     237     sal_uInt16 p1 = pPtr[0], p2 = pPtr[1];
>     238     while(pPtr[2] && (pPtr[2] - p2 == 1))
>     239     {
>     240         p2 = pPtr[3];
>     241         pPtr += 2;
>     242     }
>     243     pPtr += 2;
> see
> http://opengrok.libreoffice.org/xref/core/sd/source/ui/func/fupage.cxx#238
> pPtr isn't used.
>
> So either it can just be removed or something is wrong here.
>
> Any idea?
>
> Julien
>
>
>
>
> --
> View this message in context:
> http://nabble.documentfoundation.org/Cppcheck-reports-an-assignment-which-isn-t-used-in-sd-source-ui-func-fupage-cxx-tp4026217.html
> Sent from the Dev mailing list archive at Nabble.com.
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20121228/d82d1bc7/attachment.html>


More information about the LibreOffice mailing list