removed the warnings from HP-UX build log

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-07-26 16:09:16 +00:00
parent e1f35294c9
commit a6f8c30c69
7 changed files with 188 additions and 178 deletions

View File

@@ -403,6 +403,15 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset,
// if didn't find it there, try to reckognise it ourselves // if didn't find it there, try to reckognise it ourselves
if ( encoding == wxFONTENCODING_SYSTEM ) if ( encoding == wxFONTENCODING_SYSTEM )
{ {
// discard the optional quotes
if ( !!cs )
{
if ( cs[0u] == _T('"') && cs.Last() == _T('"') )
{
cs = wxString(cs.c_str(), cs.length() - 1);
}
}
cs.MakeUpper(); cs.MakeUpper();
if ( !cs || cs == wxT("US-ASCII") ) if ( !cs || cs == wxT("US-ASCII") )

View File

@@ -104,7 +104,7 @@ void wxHashTableBase::DeleteContents(bool flag)
wxNodeBase *wxHashTableBase::GetNode(long key, long value) const wxNodeBase *wxHashTableBase::GetNode(long key, long value) const
{ {
size_t slot = (size_t)abs(key % (long)m_hashSize); size_t slot = (size_t)abs((int)(key % (long)m_hashSize));
wxNodeBase *node; wxNodeBase *node;
if ( m_hashTable[slot] ) if ( m_hashTable[slot] )
@@ -161,7 +161,7 @@ void wxHashTableLong::Put(long key, long value)
{ {
wxCHECK_RET( m_hashSize, _T("must call Create() first") ); wxCHECK_RET( m_hashSize, _T("must call Create() first") );
size_t slot = (size_t)abs(key % (long)m_hashSize); size_t slot = (size_t)abs((int)(key % (long)m_hashSize));
if ( !m_keys[slot] ) if ( !m_keys[slot] )
{ {
@@ -179,7 +179,7 @@ long wxHashTableLong::Get(long key) const
{ {
wxCHECK_MSG( m_hashSize, wxNOT_FOUND, _T("must call Create() first") ); wxCHECK_MSG( m_hashSize, wxNOT_FOUND, _T("must call Create() first") );
size_t slot = (size_t)abs(key % (long)m_hashSize); size_t slot = (size_t)abs((int)(key % (long)m_hashSize));
wxArrayLong *keys = m_keys[slot]; wxArrayLong *keys = m_keys[slot];
if ( keys ) if ( keys )
@@ -201,7 +201,7 @@ long wxHashTableLong::Delete(long key)
{ {
wxCHECK_MSG( m_hashSize, wxNOT_FOUND, _T("must call Create() first") ); wxCHECK_MSG( m_hashSize, wxNOT_FOUND, _T("must call Create() first") );
size_t slot = (size_t)abs(key % (long)m_hashSize); size_t slot = (size_t)abs((int)(key % (long)m_hashSize));
wxArrayLong *keys = m_keys[slot]; wxArrayLong *keys = m_keys[slot];
if ( keys ) if ( keys )

View File

@@ -314,7 +314,7 @@ wxImage wxImage::Mirror( bool horizontally ) const
for (long i = 0; i < height; i++) for (long i = 0; i < height; i++)
{ {
target_data = data + 3*width*(height-1-i); target_data = data + 3*width*(height-1-i);
memcpy( target_data, source_data, 3*width ); memcpy( target_data, source_data, (size_t)3*width );
source_data += 3*width; source_data += 3*width;
} }
} }

View File

@@ -770,7 +770,7 @@ void wxFlexGridSizer::AddGrowableRow( size_t idx )
m_growableRows.Add( idx ); m_growableRows.Add( idx );
} }
void wxFlexGridSizer::RemoveGrowableRow( size_t idx ) void wxFlexGridSizer::RemoveGrowableRow( size_t WXUNUSED(idx) )
{ {
} }
@@ -779,7 +779,7 @@ void wxFlexGridSizer::AddGrowableCol( size_t idx )
m_growableCols.Add( idx ); m_growableCols.Add( idx );
} }
void wxFlexGridSizer::RemoveGrowableCol( size_t idx ) void wxFlexGridSizer::RemoveGrowableCol( size_t WXUNUSED(idx) )
{ {
} }

View File

@@ -1329,7 +1329,7 @@ void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord
// FIXME only correct for 90 degrees // FIXME only correct for 90 degrees
fprintf(m_pstream, "%d %d moveto\n", fprintf(m_pstream, "%d %d moveto\n",
XLOG2DEV((wxCoord)(x + size)), YLOG2DEV(by) ); XLOG2DEV((wxCoord)(x + size)), YLOG2DEV((wxCoord)by) );
char buffer[100]; char buffer[100];
sprintf(buffer, "%.8f rotate\n", angle); sprintf(buffer, "%.8f rotate\n", angle);
@@ -2125,9 +2125,9 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string,
// VS: dirty, but is there any better solution? // VS: dirty, but is there any better solution?
double *pt; double *pt;
pt = (double*) &m_underlinePosition; pt = (double*) &m_underlinePosition;
*pt = YLOG2DEVREL(UnderlinePosition * fontToUse->GetPointSize()) / 1000.0f; *pt = YLOG2DEVREL((wxCoord)(UnderlinePosition * fontToUse->GetPointSize())) / 1000.0f;
pt = (double*) &m_underlineThickness; pt = (double*) &m_underlineThickness;
*pt = YLOG2DEVREL(UnderlineThickness * fontToUse->GetPointSize()) / 1000.0f; *pt = YLOG2DEVREL((wxCoord)(UnderlineThickness * fontToUse->GetPointSize())) / 1000.0f;
} }
@@ -2494,7 +2494,8 @@ void wxPrintSetupData::operator=(const wxPrintData& data)
SetPrinterCommand(data.GetPrinterCommand()); SetPrinterCommand(data.GetPrinterCommand());
SetPrintPreviewCommand(data.GetPreviewCommand()); SetPrintPreviewCommand(data.GetPreviewCommand());
SetPrinterOptions(data.GetPrinterOptions()); SetPrinterOptions(data.GetPrinterOptions());
SetPrinterTranslation(data.GetPrinterTranslateX(), data.GetPrinterTranslateY()); SetPrinterTranslation((wxCoord)data.GetPrinterTranslateX(),
(wxCoord)data.GetPrinterTranslateY());
SetPrinterScaling(data.GetPrinterScaleX(), data.GetPrinterScaleY()); SetPrinterScaling(data.GetPrinterScaleX(), data.GetPrinterScaleY());
SetPrinterOrientation(data.GetOrientation()); SetPrinterOrientation(data.GetOrientation());
SetPrinterMode((int) data.GetPrintMode()); SetPrinterMode((int) data.GetPrintMode());

View File

@@ -2879,7 +2879,7 @@ long wxListMainWindow::FindItem(long start, const wxString& str, bool WXUNUSED(p
long pos = start; long pos = start;
wxString tmp = str; wxString tmp = str;
if (pos < 0) pos = 0; if (pos < 0) pos = 0;
for (size_t i = pos; i < m_lines.GetCount(); i++) for (size_t i = (size_t)pos; i < m_lines.GetCount(); i++)
{ {
wxListLineData *line = &m_lines[i]; wxListLineData *line = &m_lines[i];
wxString s = ""; wxString s = "";
@@ -2894,7 +2894,7 @@ long wxListMainWindow::FindItem(long start, long data)
{ {
long pos = start; long pos = start;
if (pos < 0) pos = 0; if (pos < 0) pos = 0;
for (size_t i = pos; i < m_lines.GetCount(); i++) for (size_t i = (size_t)pos; i < m_lines.GetCount(); i++)
{ {
wxListLineData *line = &m_lines[i]; wxListLineData *line = &m_lines[i];
wxListItem item; wxListItem item;

View File

@@ -1660,7 +1660,7 @@ void wxTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
} }
dc.SetBackgroundMode(wxTRANSPARENT); dc.SetBackgroundMode(wxTRANSPARENT);
int extraH = (total_h > text_h) ? (total_h - text_h)/2 : 0; long extraH = (total_h > text_h) ? (total_h - text_h)/2 : 0;
dc.DrawText( item->GetText(), dc.DrawText( item->GetText(),
(wxCoord)(image_w + item->GetX()), (wxCoord)(image_w + item->GetX()),
(wxCoord)(item->GetY() + extraH)); (wxCoord)(item->GetY() + extraH));