Subject: patch -- abi and peer trees almost warning-free
From: Paul Rohr (paul@abisource.com)
Date: Wed Aug 08 2001 - 20:43:34 CDT
We've always strived to make the abi/src tree build completely warning-free
on Windows, but been less conscientious about holding the peer libraries to
the same standard.
However, I've noticed that Mike's recently started fixing peer libraries --
yay, Mike! -- so since I needed a fresh build anyhow, I figured I'd knock
off some easy warnings, too.
In short, the following trees all now build warning-free for me on Win32
using VC5 / Cygwin:
expat
libpng
zlib
wv
abi
The only remaining warnings here are these four impexp glitches:
-- snip --
ie_exp_Applix.cpp(288) : warning C4065: switch statement contains 'default'
but
no 'case' labels
ie_exp_HTML.cpp(1298) : warning C4244: 'argument' : conversion from 'const
unsig
ned short' to 'char', possible loss of data
ie_imp_MsWord_97.cpp(1180) : warning C4800: 'unsigned int' : forcing value
to bo
ol 'true' or 'false' (performance warning)
ie_imp_MsWord_97.cpp(1186) : warning C4800: 'unsigned int' : forcing value
to bo
ol 'true' or 'false' (performance warning)
-- snip --
Still TODO are the last two peer libraries:
libiconv ... see prior message
psiconv ... Frodo, should these be fixed upstream instead?
Fixed warnings.
M abi/src/af/util/xp/ut_exception.h
M abi/src/text/ptbl/xp/pd_Document.cpp
M abi/src/wp/impexp/xp/ie_exp_RTF.h
M expat/lib/xmlparse.c
M wv/libole2/ms-ole.c
M zlib/trees.c
Given how close we are to 0.9.1, and the number of upstream libraries I've
touched, here are the relevant diffs:
Index: src/af/util/xp/ut_exception.h
===================================================================
RCS file: /cvsroot/abi/src/af/util/xp/ut_exception.h,v
retrieving revision 1.5
diff -u -r1.5 ut_exception.h
--- src/af/util/xp/ut_exception.h 2001/08/08 16:56:36 1.5
+++ src/af/util/xp/ut_exception.h 2001/08/08 23:17:50
@@ -43,6 +43,10 @@
// -DAL-
//
+#if defined(_MSC_VER) && !(_MSC_VER > 1100) // MSVC 5 and lower
+#define ABI_DOESNT_SUPPORT_EXCEPTIONS = 1
+#endif
+
// UT_TRY will begin a 'try' block
// UT_CATCH will 'catch' a specific exception type
// UT_END_CATCH evaluates to nothing, basically, but use it
Index: src/text/ptbl/xp/pd_Document.cpp
===================================================================
RCS file: /cvsroot/abi/src/text/ptbl/xp/pd_Document.cpp,v
retrieving revision 1.129
diff -u -r1.129 pd_Document.cpp
--- src/text/ptbl/xp/pd_Document.cpp 2001/08/08 09:41:12 1.129
+++ src/text/ptbl/xp/pd_Document.cpp 2001/08/09 00:39:57
@@ -1754,7 +1754,7 @@
i++;
}
if(i>0)
- UT_DEBUGMSG(("!!!!Waited %d microseconds for redraw to
finish \m
",i*100));
+ UT_DEBUGMSG(("!!!!Waited %d microseconds for redraw to
finish \n
",i*100));
m_bRedrawHappenning = false;
m_bPieceTableChanging = true;
}
Index: src/wp/impexp/xp/ie_exp_RTF.h
===================================================================
RCS file: /cvsroot/abi/src/wp/impexp/xp/ie_exp_RTF.h,v
retrieving revision 1.12
diff -u -r1.12 ie_exp_RTF.h
--- src/wp/impexp/xp/ie_exp_RTF.h 2001/07/27 20:49:47 1.12
+++ src/wp/impexp/xp/ie_exp_RTF.h 2001/08/08 23:18:13
@@ -29,7 +29,7 @@
class PP_AttrProp;
class s_RTF_ListenerWriteDoc;
class s_RTF_ListenerGetProps;
-class _rtf_font_info;
+struct _rtf_font_info;
// The exporter/writer for RTF file format (based upon spec version 1.5).
Index: lib/xmlparse.c,v
===================================================================
RCS file: /cvsroot/expat/lib/xmlparse.c,v
retrieving revision 1.1
diff -u -r1.1 xmlparse.c
--- lib/xmlparse.c 2001/01/31 07:11:47 1.1
+++ lib/xmlparse.c 2001/08/08 23:28:03
@@ -26,6 +26,8 @@
#endif /* ndef COMPILED_FROM_DSP */
#include <stddef.h>
+#include <memory.h>
+#include <string.h>
#ifdef XML_UNICODE
#define XML_ENCODE_MAX XML_UTF16_ENCODE_MAX
Index: libole2/ms-ole.c
===================================================================
RCS file: /cvsroot/wv/libole2/ms-ole.c,v
retrieving revision 1.21
diff -u -r1.21 ms-ole.c
--- libole2/ms-ole.c 2001/07/20 14:04:06 1.21
+++ libole2/ms-ole.c 2001/08/08 23:50:51
@@ -36,6 +36,10 @@
#include <glib.h>
#include <string.h>
+#ifndef HAVE_GNOMEVFS
+#include <io.h> /* use "normal" IO */
+#endif
+
#include "ms-ole.h"
#ifdef HAVE_MMAP
Index: trees.c
===================================================================
RCS file: /cvsroot/zlib/trees.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 trees.c
--- trees.c 1999/02/15 20:28:43 1.1.1.1
+++ trees.c 2001/08/08 23:31:52
@@ -1107,7 +1107,7 @@
} /* literal or match pair ? */
/* Check that the overlay between pending_buf and d_buf+l_buf is
ok: */
- Assert(s->pending < s->lit_bufsize + 2*lx, "pendingBuf overflow");
+ Assert(s->pending < (int)(s->lit_bufsize + 2*lx), "pendingBuf
overflow"
);
} while (lx < s->last_lit);
If anyone wants to look these over, that's great. Or, I'd be happy to
commit 'em myself sometime tomorrow. Let me know.
Paul
This archive was generated by hypermail 2b25 : Wed Aug 08 2001 - 20:35:47 CDT