fix some of icc 11.0 warnings and disable a few others

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-11-16 14:24:13 +00:00
parent 5bd57a7e4f
commit 5c69ef61f3
13 changed files with 80 additions and 78 deletions

View File

@@ -7409,14 +7409,14 @@ dnl check for icc before gcc as icc is also recognized as gcc
if test "x$INTELCC" = "xyes" ; then
dnl Warnings which can't be easily suppressed in C code are disabled:
dnl
dnl remark #810: conversion from "x" to "y" may lose significant bits
dnl remark #869: parameter "foo" was never referenced
dnl remark #1572: floating-point equality and inequality comparisons
dnl #810: conversion from "x" to "y" may lose significant bits
dnl #869: parameter "foo" was never referenced
dnl #1572: floating-point equality and inequality comparisons
dnl are unreliable
dnl remark #1684: conversion from pointer to same-sized integral type
dnl
dnl (for others see below)
CWARNINGS="-Wall -wd810,869,981,1418,1572,1684"
dnl #1684: conversion from pointer to same-sized integral type
dnl #2259: non-pointer conversion from "x" to "y" may lose significant
dnl bits
CWARNINGS="-Wall -wd810,869,981,1418,1572,1684,2259"
elif test "$GCC" = yes ; then
CWARNINGS="-Wall -Wundef"
fi
@@ -7428,15 +7428,16 @@ if test "x$INTELCXX" = "xyes" ; then
dnl (279) are generated for standard macros and so there is nothing we can
dnl do about them
dnl
dnl remark #279: controlling expression is constant
dnl remark #383: value copied to temporary, reference to temporary used
dnl remark #444: destructor for base class "xxx" is not virtual
dnl remark #810: conversion from "x" to "y" may lose significant bits
dnl remark #869: parameter "foo" was never referenced
dnl remark #981: operands are evaluated in unspecified order
dnl remark #1418: external definition with no prior declaration
dnl remark #1419: external declaration in primary source file
CXXWARNINGS="-Wall -wd279,383,444,810,869,981,1418,1419"
dnl #279: controlling expression is constant
dnl #383: value copied to temporary, reference to temporary used
dnl #444: destructor for base class "xxx" is not virtual
dnl #981: operands are evaluated in unspecified order
dnl #1418: external definition with no prior declaration
dnl #1419: external declaration in primary source file
dnl #1881: argument must be a constant null pointer value
dnl
dnl (for others see CWARNINGS above)
CXXWARNINGS="-Wall -wd279,383,444,810,869,981,1418,1419,1881,2259"
elif test "$GXX" = yes ; then
CXXWARNINGS="-Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy"
AX_CXXFLAGS_GCC_OPTION(-Woverloaded-virtual, CXXWARNINGS)

View File

@@ -179,7 +179,7 @@ public:
private:
// reference-counted data
struct Data : wxPrivate::UntypedBufferData
struct Data : public wxPrivate::UntypedBufferData
{
Data(CharType *str, Kind kind = Owned)
: UntypedBufferData(str, kind)

View File

@@ -268,6 +268,8 @@ typedef short int WXTYPE;
#pragma warning(disable: 1682)
/* conversion from "X" to "T" may lose significant bits */
#pragma warning(disable: 810)
/* non-pointer conversion from "foo" to "bar" may lose significant bits */
#pragma warning(disable: 2259)
return x;

View File

@@ -279,7 +279,7 @@ private:
// the current decoder state: this is only used by ToWChar() if srcLen
// parameter is not wxNO_LEN, when working on the entire NUL-terminated
// strings we neither update nor use the state
class DecoderState : StateMode
class DecoderState : private StateMode
{
private:
// current state: this one is private as we want to enforce the use of
@@ -311,7 +311,7 @@ private:
// encoder state is simpler as we always receive entire Unicode characters
// on input
class EncoderState : StateMode
class EncoderState : private StateMode
{
private:
Mode mode;

View File

@@ -564,7 +564,7 @@ struct wxArgNormalizerNarrowChar
// FIXME-UTF8: which one is better default in absence of fmt string
// (i.e. when used like e.g. Foo("foo", "bar", 'c', NULL)?
if ( !fmt || fmt->GetArgumentType(index) == wxFormatString::Arg_Char )
m_value = wxUniChar(value).GetValue();
m_value = wx_truncate_cast(T, wxUniChar(value).GetValue());
else
m_value = value;
}

View File

@@ -155,7 +155,7 @@ private:
{
#if wxUSE_UNICODE
if ( c < 0x80 )
return c;
return wx_truncate_cast(char, c);
return ToHi8bit(c);
#else

View File

@@ -148,7 +148,7 @@ CPP_METHODDEF(void) wx_term_source ( j_decompress_ptr cinfo )
// JPEG error manager:
struct wx_error_mgr : jpeg_error_mgr
struct wx_error_mgr : public jpeg_error_mgr
{
jmp_buf setjmp_buffer; /* for return to caller */
};

View File

@@ -3364,6 +3364,11 @@ wxCharBuffer wxSafeConvertWX2MB(const wchar_t *ws)
#define WX_DEFINE_GLOBAL_CONV(klass, name, ctor_args) \
WX_DEFINE_GLOBAL_CONV2(klass, klass, name, ctor_args)
#ifdef __INTELC__
// disable warning "variable 'xxx' was declared but never referenced"
#pragma warning(disable: 177)
#endif // Intel C++
#ifdef __WINDOWS__
WX_DEFINE_GLOBAL_CONV2(wxMBConv, wxMBConv_win32, wxConvLibc, wxEMPTY_PARAMETER_VALUE);
#else

View File

@@ -68,9 +68,6 @@ wxUString &wxUString::assignFromAscii( const char *str, size_type n )
// UTF-8
// ----------------------------------------------------------------------------
static const wxUint32 utf8_max[]=
{ 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff, 0xffffffff };
// this table gives the length of the UTF-8 encoding from its first character:
const unsigned char tableUtf8Lengths[256] = {
// single-byte sequences (ASCII):

View File

@@ -1226,7 +1226,6 @@ void wxPostScriptDCImpl::SetPen( const wxPen& pen )
double bluePS = (double)(blue) / 255.0;
double greenPS = (double)(green) / 255.0;
wxString buffer;
buffer.Printf( "%f %f %f setrgbcolor\n", redPS, greenPS, bluePS );
buffer.Replace( ",", "." );
PsPrint( buffer );

View File

@@ -148,7 +148,6 @@ wxProgressDialog::wxProgressDialog(const wxString& title,
m_msg = new wxStaticText(this, wxID_ANY, message);
sizerTop->Add(m_msg, 0, wxLEFT | wxTOP, 2*LAYOUT_MARGIN);
wxSize sizeLabel = m_msg->GetSize();
if ( maximum > 0 )
{
int gauge_style = wxGA_HORIZONTAL;

View File

@@ -25,7 +25,7 @@
// this is defined in src/gtk/toplevel.cpp
extern int wxOpenModalDialogsCount;
wxDEFINE_TIED_SCOPED_PTR_TYPE(wxGUIEventLoop);
wxDEFINE_TIED_SCOPED_PTR_TYPE(wxGUIEventLoop)
//-----------------------------------------------------------------------------

View File

@@ -603,7 +603,6 @@ void wxMimeTypesManagerImpl::Initialize(int mailcapStyles,
{
if (textfile.GetLine(i).Find(wxT("=")) != wxNOT_FOUND)
{
wxString mimeType = textfile.GetVerb(i);
wxString desktopFile = textfile.GetCmd(i);
if (deskTopFilesSeen.Index(desktopFile) == wxNOT_FOUND)