Hello,

 When building PLplot using Microsoft Visual C++ 7.1 (a.k.a. 2003) there
are tons of mostly harmless warnings about possible loss of data in
implicit conversions, e.g. to give example of just one file:

src\plsym.c(179) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(179) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(180) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(180) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(195) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(195) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1177) : warning C4018: '>' : signed/unsigned mismatch
src\plsym.c(1179) : warning C4018: '<' : signed/unsigned mismatch
src\plsym.c(1373) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1374) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1400) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1400) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1400) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1400) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1410) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1410) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1410) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1410) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1535) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1536) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1561) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1561) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1561) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1561) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1570) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1570) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1570) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1570) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1658) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1659) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1676) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1676) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1676) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data
src\plsym.c(1676) : warning C4244: 'function' : conversion from 'PLFLT' to 
'PLINT', possible loss of data

This makes it pretty difficult to see anything other than those warnings so
I'd like to suggest the following trivial patch:

diff -r 67207ffd2063 CMakeLists.txt
--- a/CMakeLists.txt    Fri Mar 20 14:42:35 2009 +0100
+++ b/CMakeLists.txt    Thu Apr 23 18:46:32 2009 +0200
@@ -88,6 +88,11 @@
   ADD_DEFINITIONS("/D_CRT_SECURE_NO_DEPRECATE")
 endif(MSVC_VERSION GREATER 1399)

+# Also disable truncation warnings, there are too many of them to be useful
+if(MSVC_VERSION GREATER 1299)
+  ADD_DEFINITIONS("/wd4244")
+endif(MSVC_VERSION GREATER 1299)
+
 # in windows all created dlls are gathered in the dll directory
 # if you add this directory to your PATH all shared libraries are available
 if(BUILD_SHARED_LIBS AND WIN32 AND NOT CYGWIN)

which makes the build output reasonably readable. For the reference, here
are the only remaining warnings:

src\plcore.c(401) : warning C4101: 'endptr2' : unreferenced local variable
src\plcore.c(2144) : warning C4013: '_getcwd' undefined; assuming extern 
returning int
src\plcore.c(2144) : warning C4047: '==' : 'int' differs in levels of 
indirection from 'void *'
src\plcore.c(2150) : warning C4013: 'chdir' undefined; assuming extern 
returning int
src\plcore.c(2151) : warning C4047: '==' : 'int' differs in levels of 
indirection from 'void *'
src\plimage.c(100) : warning C4101: 'corners' : unreferenced local variable
src\plstdio.c(111) : warning C4101: 'bytes' : unreferenced local variable
src\plsym.c(1177) : warning C4018: '>' : signed/unsigned mismatch
src\plsym.c(1179) : warning C4018: '<' : signed/unsigned mismatch
src\plbuf.c(1140) : warning C4018: '<' : signed/unsigned mismatch
src\plbuf.c(1147) : warning C4018: '<' : signed/unsigned mismatch
src\ltdl_win32.c(67) : warning C4133: 'function' : incompatible types - from 
'char *' to 'LPCWSTR'
bindings\c++\plstream.cc(1693) : warning C4800: 'PLINT' : forcing value to bool 
'true' or 'false' (performance warning)
bindings\c++\plstream.cc(2135) : warning C4800: 'PLBOOL' : forcing value to 
bool 'true' or 'false' (performance warning)
bindings\c++\plstream.cc(2269) : warning C4717: 'plstream::xform' : recursive 
on all control paths, function will cause runtime stack overflow

 The last one seems quite fatal and also correct, it seems "::" was
forgotten there but as I don't use this function I didn't test the fix.

 Thanks,
VZ

Attachment: pgpL2e2FjabMn.pgp
Description: PGP signature

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to