incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Janík <Pa...@Janik.cz>
Subject Re: svx/source/svdraw/svdfmtf.cxx
Date Sat, 19 May 2012 13:23:10 GMT
Hi,

>> WaE = Warning as Error.

or Warnings Are Errors.

Gcc option -Werror: Make all warnings into errors.

With this option turned on, all warnings are made into errors. Our long term goal is to make
gcc silent.

These issues are not errors per se, but e.g.:

@@ -1330,6 +1331,7 @@
 
 void ImpSdrGDIMetaFileImport::DoAction(MetaWallpaperAction& rAct)
 {
+    (void) rAct;
     OSL_ENSURE(false, "Tried to construct SdrObject from MetaWallpaperAction: not supported
(!)");
 }
 
This means that rAct is unused in the method. gcc warns about it.

This change:

@@ -1384,6 +1388,7 @@
                 case GRADIENT_ELLIPTICAL: aXGradientStyle = XGRAD_ELLIPTICAL; break;
                 case GRADIENT_SQUARE: aXGradientStyle = XGRAD_SQUARE; break;
                 case GRADIENT_RECT: aXGradientStyle = XGRAD_RECT; break;
+               default: break;
             }
             
             const XFillGradientItem aXFillGradientItem(

means that some enum value is forgotten in the switch.

This change:

-                            for(sal_uInt32 y(0); y < pOld->Height(); y++)
+                            for(sal_Int32 y(0); y < pOld->Height(); y++)

means that we were comparing signed and unsigned value.

I do not know if these changes are OK, thus I send the patch as I used to make the module
WaE free.

Hope this helps.

P.S. Of course warnings differ between compilers and sometims the changes look weird etc.
-- 
Pavel Janík




Mime
View raw message