Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#171 Multiple warnings on eVC++ and VC++

1.12.0
open
5
2006-10-26
2006-10-26
Giora Unger
No

I compiled on WinCE, eVC++ 4 with Dinkumware STL.
I also compiled on WinXP, VC++ 6.0 with native MS STL.

There are many warnings-related issues:
1. On eVC++ 4, TestAssert.h causes multiple warnings,
such as warning C4127: conditional expression is
constant
This is due to CPPUNIT_ASSERT_THROW_MESSAGE and
CPPUNIT_ASSERT_NO_THROW_MESSAGE
containing the expression "while ( false )".

2. Multiple warnings in the cppunit project (and my
projects which use cppunit), inside SSTREAM.
Most of them are
C:\Program Files\Microsoft Platform
SDK\Include\sstream(58) : warning C4018: '<' :
signed/unsigned mismatch
C:\Program Files\Microsoft Platform
SDK\Include\sstream(49) : while compiling class-
template member function 'int __thiscall
std::basic_stringbuf<char,struct
std::char_traits<char>,class std::allocator<char>
>::overflow(int)'

or

c:\program files\microsoft platform sdk\include\xtree
(144) : warning C4284: return type
for 'std::_Tree<class CppUnit::TestFactory *,class
CppUnit::TestFactory *,struct std::set<class
CppUnit::TestFactory *,struct std::less<class
CppUnit::TestFactor
y *>,class std::allocator<class CppUnit::TestFactory
*> >::_Kfn,struct std::less<class
CppUnit::TestFactory *>,class std::allocator<class
CppUnit::TestFactory *> >::const_iterator::operator -
>' is 'class CppUnit::TestFactory *const * ' (ie; not
a UD
T or reference to a UDT. Will produce errors if
applied using infix notation)
c:\program files\microsoft visual studio\vc98
\include\set(33) : see reference to class template
instantiation 'std::_Tree<class CppUnit::TestFactory
*,class CppUnit::TestFactory *,struct std::set<class
CppUnit::TestFactory *,struct std::less
<class CppUnit::TestFactory *>,class
std::allocator<class CppUnit::TestFactory *>
>::_Kfn,struct std::less<class CppUnit::TestFactory
*>,class std::allocator<class CppUnit::TestFactory *>
>' being compiled

c:\work\src\p4_all\bda\main\development\thirdparty\inc
lude\cppunit\extensions\testfactoryregistry.h(169) :
see reference to class template
instantiation 'std::set<class CppUnit::TestFactory
*,struct std::less<class CppUnit::TestFactory *>,cl
ass std::allocator<class CppUnit::TestFactory *> >'
being compiled

3. In eVC++, when setting to warning level 4 (not
usually feasible in VC++ 6.0 "thanks" to MS "great"
job...), ther eare numerous warnings. Not crucial but
would better be avoided.

Hope this helps,

Giora Unger

Discussion