New Defects reported by Coverity Scan for LibreOffice
Lionel Elie Mamane
lionel at mamane.lu
Sat May 30 09:43:36 PDT 2015
On Sat, May 30, 2015 at 09:19:54AM -0700, scan-admin at 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
More information about the LibreOffice
mailing list