On Sat, May 30, 2015 at 09:19:54AM -0700, scan-admin@coverity.com wrote:
*** CID 1302698: Code maintainability issues (UNUSED_VALUE)
/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx: 1647 in
GtkSalGraphics::updateSettings(AllSettings &)()
1641 case PANGO_STRETCH_ULTRA_CONDENSED: aInfo.m_eWidth =
WIDTH_ULTRA_CONDENSED;break;
1642 case PANGO_STRETCH_EXTRA_CONDENSED: aInfo.m_eWidth =
WIDTH_EXTRA_CONDENSED;break;
1643 case PANGO_STRETCH_CONDENSED: aInfo.m_eWidth = WIDTH_CONDENSED;break;
1644 case PANGO_STRETCH_SEMI_CONDENSED: aInfo.m_eWidth =
WIDTH_SEMI_CONDENSED;break;
1645 case PANGO_STRETCH_NORMAL: aInfo.m_eWidth = WIDTH_NORMAL;break;
1646 case PANGO_STRETCH_SEMI_EXPANDED: aInfo.m_eWidth = WIDTH_SEMI_EXPANDED;break;
CID 1302698: Code maintainability issues (UNUSED_VALUE)
Assigning value "WIDTH_EXPANDED" to "aInfo.m_eWidth" here, but that stored value is
overwritten before it can be used.
1647 case PANGO_STRETCH_EXPANDED: aInfo.m_eWidth = WIDTH_EXPANDED;break;
1648 case PANGO_STRETCH_EXTRA_EXPANDED: aInfo.m_eWidth =
WIDTH_EXTRA_EXPANDED;break;
1649 case PANGO_STRETCH_ULTRA_EXPANDED: aInfo.m_eWidth =
WIDTH_ULTRA_EXPANDED;break;
1650 }
1651 aInfo.m_eWidth = WIDTH_ULTRA_CONDENSED;
That last unconditional "aInfo.m_eWidth = WIDTH_ULTRA_CONDENSED;" does
look like an obvious (old! 2011!) error, but should we just remove it
or make it the default?
--
Lionel
Context
- Re: New Defects reported by Coverity Scan for LibreOffice · Lionel Elie Mamane
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.