Hi,

A build with --enable-debug (or is it --enable-dbgutil?) fails in
graphite... for a problem already corrected in graphite's
configure.ac, but its "configure" is outdated and thus the problem
still surfaces.

The problem is that graphite does not build with -Werror in debug
mode; one of the least fixable reasons is that it uses asserts left
and right, asserts are *designed* to always be true, sometimes gcc
detects that they are (e.g. when comparing an unsigned integer type
with 0), this raises a warning that gets treated as error because of
-Werror.

graphite's configure puts -Werror in CFLAGS when passed
--enable-debug; its configure.ac does not, so all I had to do was to
run autoconf.

Before I got to the point of trying to disable -Werror (and
understanding why it was enabled in the first place), I fixed one of
the warnings. Patch attached, still does not hurt to apply janitorialy
:)

-- 
Lionel
diff -u --recursive silgraphite-2.3.1/engine/src/generic/Util.cpp ../../graphite/unxlngx6/misc/build/silgraphite-2.3.1/engine/src/generic/Util.cpp
--- silgraphite-2.3.1/engine/src/generic/Util.cpp	2009-01-21 23:36:42.000000000 +0100
+++ ../../graphite/unxlngx6/misc/build/silgraphite-2.3.1/engine/src/generic/Util.cpp	2011-01-14 23:27:40.000000000 +0100
@@ -191,8 +194,8 @@
 		else
 			iuLim = iu;
 	}
-	Assert(iuMin == cu || iuMin < cu && u <= g_rguPrimes[iuMin]);
-	Assert(iuMin == 0 || iuMin > 0 && u > g_rguPrimes[iuMin - 1]);
+	Assert(iuMin == cu || (iuMin < cu && u <= g_rguPrimes[iuMin]));
+	Assert(iuMin == 0  || (iuMin > 0  && u >  g_rguPrimes[iuMin - 1]));
 
 	if (!iuMin)
 		return g_rguPrimes[0];
@@ -222,8 +225,8 @@
 		else
 			iuLim = iu;
 	}
-	Assert(iuMin == cu || iuMin < cu && u < g_rguPrimes[iuMin]);
-	Assert(iuMin == 0 || iuMin > 0 && u >= g_rguPrimes[iuMin - 1]);
+	Assert(iuMin == cu || (iuMin < cu && u <  g_rguPrimes[iuMin]));
+	Assert(iuMin == 0  || (iuMin > 0  && u >= g_rguPrimes[iuMin - 1]));
 
 	if (iuMin == cu)
 		return g_rguPrimes[cu - 1];
@@ -249,8 +252,8 @@
 		else
 			iuLim = iu;
 	}
-	Assert(iuMin == cu || iuMin < cu && u <= g_rguPrimes[iuMin]);
-	Assert(iuMin == 0 || iuMin > 0 && u > g_rguPrimes[iuMin - 1]);
+	Assert(iuMin == cu || (iuMin < cu && u <= g_rguPrimes[iuMin]));
+	Assert(iuMin == 0  || (iuMin > 0  && u >  g_rguPrimes[iuMin - 1]));
 
 	if (!iuMin)
 		return g_rguPrimes[0];
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to