[Libreoffice] [PATCH] warining elimination

2011-09-01 Thread Jenei Gábor

Hello,

Here is a patch to avoid compile time warnings, actually most of them 
are unfortunatelly not in our source but in libraries like OpenSSL, 
could you tell me why are these libraries compiled? On most of the linux 
machines it should be already installed, aren't compiled shared 
libraries enough? And why? I actually don't understand why it's 
compiled, it should be mentioned only as a dependency, so who doesn't 
have it shoul look up on apt/rpm.


Gabor
From 1b27ced6fc523886ba748e9a4e3e67fbf6312852 Mon Sep 17 00:00:00 2001
From: Gabor Jenei jen...@elte.hu
Date: Thu, 1 Sep 2011 12:30:03 +0200
Subject: [PATCH] fix warnings

---
 cppcanvas/source/mtfrenderer/emfplus.cxx  |  108 -
 cppcanvas/source/mtfrenderer/implrenderer.cxx |8 +-
 sc/source/core/inc/parclass.hxx   |2 +-
 sc/source/core/tool/parclass.cxx  |   12 ++--
 svtools/source/filter/wmf/enhwmf.cxx  |   15 ++--
 svtools/source/filter/wmf/winmtf.cxx  |2 +-
 6 files changed, 72 insertions(+), 75 deletions(-)

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 327fd41..b70f90a 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -270,7 +270,7 @@ namespace cppcanvas
 s  header  parts;
 
 EMFP_DEBUG (printf (EMF+\tregion\n));
-EMFP_DEBUG (printf (EMF+\theader: 0x%08x parts: %d\n, 
header, parts));
+EMFP_DEBUG (printf (EMF+\theader: 0x%08x parts: %d\n, 
(unsigned int)header, (int)parts));
 
 if (parts) {
 if( parts0 || 
sal_uInt32(parts)SAL_MAX_INT32/sizeof(sal_Int32) )
@@ -280,12 +280,12 @@ namespace cppcanvas
 
 for (int i = 0; i  parts; i ++) {
 s  combineMode [i];
-EMFP_DEBUG (printf (EMF+\tcombine mode [%d]: 
0x%08x\n, i, combineMode [i]));
+EMFP_DEBUG (printf (EMF+\tcombine mode [%d]: 
0x%08x\n, i,(unsigned int)combineMode [i]));
 }
 }
 
 s  initialState;
-EMFP_DEBUG (printf (EMF+\tinitial state: 0x%08x\n, 
initialState));
+EMFP_DEBUG (printf (EMF+\tinitial state: 0x%d\n,(int) 
initialState));
 }
 };
 
@@ -355,7 +355,7 @@ namespace cppcanvas
 
 s  header  type;
 
-EMFP_DEBUG (printf (EMF+\tbrush\nEMF+\theader: 0x%08x type: 
%d\n, header, type));
+EMFP_DEBUG (printf (EMF+\tbrush\nEMF+\theader: 0x%08x type: 
%d\n,(unsigned int) header,(int) type));
 
 switch (type) {
 case 0:
@@ -364,7 +364,7 @@ namespace cppcanvas
 
 s  color;
 solidColor = ::Color (0xff - (color  24), (color  
16)  0xff, (color  8)  0xff, color  0xff);
-EMFP_DEBUG (printf (EMF+\tsolid color: 0x%08x\n, 
color));
+EMFP_DEBUG (printf (EMF+\tsolid color: 0x%08x\n, 
(unsigned int)color));
 
 break;
 }
@@ -373,19 +373,19 @@ namespace cppcanvas
 {
 s  additionalFlags  wrapMode;
 
-EMFP_DEBUG (printf (EMF+\tpath gradient, additional 
flags: 0x%02x\n, additionalFlags));
+EMFP_DEBUG (printf (EMF+\tpath gradient, additional 
flags: 0x%02x\n,(unsigned int) additionalFlags));
 
 sal_uInt32 color;
 
 s  color;
 solidColor = ::Color (0xff - (color  24), (color  
16)  0xff, (color  8)  0xff, color  0xff);
-EMFP_DEBUG (printf (EMF+\tcenter color: 0x%08x\n, 
color));
+EMFP_DEBUG (printf (EMF+\tcenter color: 
0x%08x\n,(unsigned int) color));
 
 s  areaX  areaY;
 EMFP_DEBUG (printf (EMF+\tcenter point: %f,%f\n, 
areaX, areaY));
 
 s  surroundColorsNumber;
-EMFP_DEBUG (printf (EMF+\tsurround colors: %d\n, 
surroundColorsNumber));
+EMFP_DEBUG (printf (EMF+\tsurround colors: 
%d\n,(int) surroundColorsNumber));
 
 if( surroundColorsNumber0 || 
sal_uInt32(surroundColorsNumber)SAL_MAX_INT32/sizeof(::Color) )
 surroundColorsNumber = 
SAL_MAX_INT32/sizeof(::Color);
@@ -396,14 +396,14 @@ namespace cppcanvas
 surroundColors[i] = ::Color (0xff - (color  24), 
(color  16)  0xff, (color  8)  0xff, color  0xff);
 if (i == 0)
 secondColor = surroundColors [0];
-EMFP_DEBUG (printf (EMF+\tsurround color[%d]: 
0x%08x\n, i, color));
+EMFP_DEBUG (printf (EMF+\tsurround color[%d]: 
0x%08x\n, i, (unsigned 

Re: [Libreoffice] [PATCH] warining elimination

2011-09-01 Thread Andras Timar
Hello Gábor,

2011/9/1 Jenei Gábor jen...@elte.hu:
 Hello,

 Here is a patch to avoid compile time warnings, actually most of them are
 unfortunatelly not in our source but in libraries like OpenSSL, could you
 tell me why are these libraries compiled? On most of the linux machines it
 should be already installed, aren't compiled shared libraries enough? And
 why? I actually don't understand why it's compiled, it should be mentioned
 only as a dependency, so who doesn't have it shoul look up on apt/rpm.


You can configure --with-system-openssl. Same applies to many system
libs. See distro-configs/ and ./configure --help

On Windows for example one has to compile everything.

Best regards,
Andras
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice