Compile error in salgdi2.cxx on linux with -Werror

Jean-Noël Rouvignac jn.rouvignac at gmail.com
Thu Mar 7 23:27:48 PST 2013


Hello guys,

I am getting a compile error on linux because I am using -Werror.
See down below:

/home/djano/libreoffice-core-gcc9/vcl/unx/generic/gdi/salgdi2.cxx: In
member function ‘bool X11SalGraphics::drawAlphaBitmapOpt(const SalTwoRect&,
const SalBitmap&, const SalBitmap&, bool)’:
/home/djano/libreoffice-core-gcc9/vcl/unx/generic/gdi/salgdi2.cxx:763:42:
error: ‘aAlphaPM’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
In file included from
/home/djano/libreoffice-core-gcc9/vcl/unx/generic/gdi/salgdi2.cxx:34:0:
/home/djano/libreoffice-core-gcc9/vcl/unx/generic/gdi/xrender_peer.hxx:126:84:
error: ‘aAlphaPic’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
/home/djano/libreoffice-core-gcc9/vcl/unx/generic/gdi/salgdi2.cxx:661:13:
note: ‘aAlphaPic’ was declared here
cc1plus: all warnings being treated as errors

This code was committed yesterday.
I am not sure what should aAlphaPM be initialized to?

Also why is all the code not currently compiled with -Werror?
Is it because it would slow down the build? Or is it because there are
false positive warnings?
IMHO, using -Werror could prevent many mistakes.

Cheers,
Jean-Noel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130308/12d8880b/attachment.html>


More information about the LibreOffice mailing list