getting rid of warnings

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16747 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2002-08-24 20:20:04 +00:00
parent b9deec0e79
commit 3340066af6
19 changed files with 46 additions and 114 deletions

View File

@@ -350,6 +350,7 @@ wxLongLong wxGetLocalTimeMillis()
millival += upTime.lo / 1000 ; millival += upTime.lo / 1000 ;
millival += ( ( (UInt64) upTime.hi ) << 32 ) / 1000 ; millival += ( ( (UInt64) upTime.hi ) << 32 ) / 1000 ;
val = millival ; val = millival ;
return val ;
#else // no gettimeofday() nor ftime() #else // no gettimeofday() nor ftime()
// We use wxGetLocalTime() to get the seconds since // We use wxGetLocalTime() to get the seconds since
// 00:00:00 Jan 1st 1970 and then whatever is available // 00:00:00 Jan 1st 1970 and then whatever is available

View File

@@ -202,8 +202,6 @@ bool wxClipboard::AddData( wxDataObject *data )
wxCHECK_MSG( data, FALSE, wxT("data is invalid") ); wxCHECK_MSG( data, FALSE, wxT("data is invalid") );
wxDataFormat format = data->GetPreferredFormat();
/* we can only store one wxDataObject */ /* we can only store one wxDataObject */
Clear(); Clear();
@@ -336,7 +334,7 @@ bool wxClipboard::GetData( wxDataObject& data )
{ {
wxCHECK_MSG( m_open, FALSE, wxT("clipboard not open") ); wxCHECK_MSG( m_open, FALSE, wxT("clipboard not open") );
int formatcount = data.GetFormatCount() + 1 ; size_t formatcount = data.GetFormatCount() + 1 ;
wxDataFormat *array = new wxDataFormat[ formatcount ]; wxDataFormat *array = new wxDataFormat[ formatcount ];
array[0] = data.GetPreferredFormat(); array[0] = data.GetPreferredFormat();
data.GetAllFormats( &array[1] ); data.GetAllFormats( &array[1] );

View File

@@ -262,10 +262,6 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
const wxValidator& validator, const wxValidator& validator,
const wxString& name) const wxString& name)
{ {
Rect bounds ;
Str255 title ;
if ( !wxControl::Create(parent, id, wxDefaultPosition, wxDefaultSize, style , if ( !wxControl::Create(parent, id, wxDefaultPosition, wxDefaultSize, style ,
wxDefaultValidator, name) ) wxDefaultValidator, name) )
{ {

View File

@@ -819,7 +819,6 @@ void wxControl::OnMouseEvent( wxMouseEvent &event )
ControlHandle control ; ControlHandle control ;
Point localwhere ; Point localwhere ;
SInt16 controlpart ; SInt16 controlpart ;
WindowRef window = (WindowRef) MacGetRootWindow() ;
localwhere.h = x ; localwhere.h = x ;
localwhere.v = y ; localwhere.v = y ;
@@ -840,20 +839,7 @@ void wxControl::OnMouseEvent( wxMouseEvent &event )
if ( event.m_metaDown ) if ( event.m_metaDown )
modifiers |= cmdKey ; modifiers |= cmdKey ;
/*
#if TARGET_CARBON
control = FindControlUnderMouse( localwhere , window , &controlpart ) ;
#else
controlpart = FindControl( localwhere , window , &control ) ;
#endif
*/
{ {
/*
if ( AcceptsFocus() && FindFocus() != this )
{
SetFocus() ;
}
*/
control = (ControlHandle) m_macControl ; control = (ControlHandle) m_macControl ;
if ( control && ::IsControlActive( control ) ) if ( control && ::IsControlActive( control ) )
{ {

View File

@@ -958,8 +958,8 @@ void wxDC::DoDrawPolygon(int n, wxPoint points[],
PolyHandle polygon = OpenPoly(); PolyHandle polygon = OpenPoly();
x1 = XLOG2DEVMAC(points[0].x + xoffset); x2 = x1 = XLOG2DEVMAC(points[0].x + xoffset);
y1 = YLOG2DEVMAC(points[0].y + yoffset); y2 = y1 = YLOG2DEVMAC(points[0].y + yoffset);
::MoveTo(x1,y1); ::MoveTo(x1,y1);
for (int i = 1; i < n; i++) for (int i = 1; i < n; i++)
@@ -1439,7 +1439,7 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
if ( 0 ) if ( 0 )
{ {
m_macFormerAliasState = IsAntiAliasedTextEnabled(&m_macFormerAliasSize); m_macFormerAliasState = IsAntiAliasedTextEnabled(&m_macFormerAliasSize);
SetAntiAliasedTextEnabled(true, m_scaleY * font->m_macFontSize); SetAntiAliasedTextEnabled(true, SInt16(m_scaleY * font->m_macFontSize));
m_macAliasWasEnabled = true ; m_macAliasWasEnabled = true ;
} }
@@ -1467,9 +1467,10 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
&chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ; &chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ;
wxASSERT_MSG( status == noErr , "couldn't create the layout of the rotated text" ); wxASSERT_MSG( status == noErr , "couldn't create the layout of the rotated text" );
if ( abs(angle) > 0 ) int iAngle = int( angle );
if ( abs(iAngle) > 0 )
{ {
Fixed atsuAngle = IntToFixed( angle ) ; Fixed atsuAngle = IntToFixed( iAngle ) ;
ByteCount angleSize = sizeof(Fixed) ; ByteCount angleSize = sizeof(Fixed) ;
ATSUAttributeTag rotationTag = kATSULineRotationTag ; ATSUAttributeTag rotationTag = kATSULineRotationTag ;
ATSUAttributeValuePtr angleValue = &atsuAngle ; ATSUAttributeValuePtr angleValue = &atsuAngle ;
@@ -1865,7 +1866,7 @@ void wxDC::MacInstallFont() const
OSStatus status = noErr ; OSStatus status = noErr ;
Fixed atsuSize = IntToFixed(m_scaleY * font->m_macFontSize) ; Fixed atsuSize = IntToFixed( int(m_scaleY * font->m_macFontSize) ) ;
Style qdStyle = font->m_macFontStyle ; Style qdStyle = font->m_macFontStyle ;
ATSUFontID atsuFont = font->m_macATSUFontID ; ATSUFontID atsuFont = font->m_macATSUFontID ;
@@ -1934,13 +1935,13 @@ void wxDC::MacInstallFont() const
Pattern gHatchPatterns[] = Pattern gHatchPatterns[] =
{ {
{ 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF } , { { 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF } },
{ 0x01 , 0x02 , 0x04 , 0x08 , 0x10 , 0x20 , 0x40 , 0x80 } , { { 0x01 , 0x02 , 0x04 , 0x08 , 0x10 , 0x20 , 0x40 , 0x80 } },
{ 0x80 , 0x40 , 0x20 , 0x10 , 0x08 , 0x04 , 0x02 , 0x01 } , { { 0x80 , 0x40 , 0x20 , 0x10 , 0x08 , 0x04 , 0x02 , 0x01 } },
{ 0x10 , 0x10 , 0x10 , 0xFF , 0x10 , 0x10 , 0x10 , 0x10 } , { { 0x10 , 0x10 , 0x10 , 0xFF , 0x10 , 0x10 , 0x10 , 0x10 } },
{ 0x00 , 0x00 , 0x00 , 0xFF , 0x00 , 0x00 , 0x00 , 0x00 } , { { 0x00 , 0x00 , 0x00 , 0xFF , 0x00 , 0x00 , 0x00 , 0x00 } },
{ 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 } , { { 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 } },
{ 0x81 , 0x42 , 0x24 , 0x18 , 0x18 , 0x24 , 0x42 , 0x81 } , { { 0x81 , 0x42 , 0x24 , 0x18 , 0x18 , 0x24 , 0x42 , 0x81 } }
} ; } ;
static void wxMacGetHatchPattern(int hatchStyle, Pattern *pattern) static void wxMacGetHatchPattern(int hatchStyle, Pattern *pattern)
@@ -2040,7 +2041,6 @@ void wxDC::MacInstallPen() const
case wxUSER_DASH : case wxUSER_DASH :
{ {
wxDash* dash ; wxDash* dash ;
int number = m_pen.GetDashes(&dash) ;
// right now we don't allocate larger pixmaps // right now we don't allocate larger pixmaps
for ( int i = 0 ; i < 8 ; ++i ) for ( int i = 0 ; i < 8 ; ++i )
{ {

View File

@@ -150,8 +150,8 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& printdata)
m_ok = FALSE; m_ok = FALSE;
return; return;
} }
m_maxX = rPaper.right - rPaper.left ; m_maxX = wxCoord(rPaper.right - rPaper.left) ;
m_maxY = rPaper.bottom - rPaper.top ; m_maxY = wxCoord(rPaper.bottom - rPaper.top);
#else #else
m_maxX = (**(THPrint)m_printData.m_macPrintSettings).rPaper.right - (**(THPrint)m_printData.m_macPrintSettings).rPaper.left ; m_maxX = (**(THPrint)m_printData.m_macPrintSettings).rPaper.right - (**(THPrint)m_printData.m_macPrintSettings).rPaper.left ;
m_maxY = (**(THPrint)m_printData.m_macPrintSettings).rPaper.bottom - (**(THPrint)m_printData.m_macPrintSettings).rPaper.top ; m_maxY = (**(THPrint)m_printData.m_macPrintSettings).rPaper.bottom - (**(THPrint)m_printData.m_macPrintSettings).rPaper.top ;

View File

@@ -119,6 +119,7 @@ wxDirData::wxDirData(const wxString& dirname)
m_index = 0 ; m_index = 0 ;
OSErr err = FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ; OSErr err = FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ;
wxASSERT_MSG( err == noErr , "Error accessing directory") ;
} }
wxDirData::~wxDirData() wxDirData::~wxDirData()

View File

@@ -132,7 +132,8 @@ bool wxFrame::Enable(bool enable)
if ( m_frameMenuBar && m_frameMenuBar == wxMenuBar::MacGetInstalledMenuBar() ) if ( m_frameMenuBar && m_frameMenuBar == wxMenuBar::MacGetInstalledMenuBar() )
{ {
for ( int i = 0 ; i < m_frameMenuBar->GetMenuCount() ; ++ i ) int iMaxMenu = m_frameMenuBar->GetMenuCount();
for ( int i = 0 ; i < iMaxMenu ; ++ i )
{ {
m_frameMenuBar->EnableTop( i , enable ) ; m_frameMenuBar->EnableTop( i , enable ) ;
} }

View File

@@ -473,9 +473,6 @@ GAddress *GSocket_GetPeer(GSocket *socket)
*/ */
GSocketError GSocket_SetServer(GSocket *sck) GSocketError GSocket_SetServer(GSocket *sck)
{ {
int type;
int arg = 1;
assert(sck != NULL); assert(sck != NULL);
/* must not be in use */ /* must not be in use */
@@ -545,9 +542,6 @@ GSocketError GSocket_SetServer(GSocket *sck)
GSocket *GSocket_WaitConnection(GSocket *socket) GSocket *GSocket_WaitConnection(GSocket *socket)
{ {
GSocket *connection = NULL ; GSocket *connection = NULL ;
GSocketError err;
int arg = 1;
assert(socket != NULL); assert(socket != NULL);
@@ -640,8 +634,6 @@ GSocket *GSocket_WaitConnection(GSocket *socket)
*/ */
GSocketError GSocket_SetNonOriented(GSocket *sck) GSocketError GSocket_SetNonOriented(GSocket *sck)
{ {
int arg = 1;
assert(sck != NULL); assert(sck != NULL);
if (sck->m_endpoint != kOTInvalidEndpointRef ) if (sck->m_endpoint != kOTInvalidEndpointRef )
@@ -726,12 +718,9 @@ GSocketError GSocket_SetNonOriented(GSocket *sck)
*/ */
GSocketError GSocket_Connect(GSocket *sck, GSocketStream stream) GSocketError GSocket_Connect(GSocket *sck, GSocketStream stream)
{ {
int ret;
int arg = 1;
InetAddress addr ; InetAddress addr ;
TEndpointInfo info; TEndpointInfo info;
OTFlags flags = 0; OSStatus err = kOTNoError;
OSStatus err = kOTNoError;
TCall peer ; TCall peer ;
assert(sck != NULL); assert(sck != NULL);
@@ -932,7 +921,6 @@ int GSocket_Write(GSocket *socket, const char *buffer, int size)
*/ */
GSocketEventFlags GSocket_Select(GSocket *socket, GSocketEventFlags flags) GSocketEventFlags GSocket_Select(GSocket *socket, GSocketEventFlags flags)
{ {
OTResult state ;
assert(socket != NULL); assert(socket != NULL);
wxMacProcessNotifierEvents() ; wxMacProcessNotifierEvents() ;
/* /*
@@ -1327,8 +1315,6 @@ GSocketError GAddress_INET_SetAnyAddress(GAddress *address)
GSocketError GAddress_INET_SetHostAddress(GAddress *address, GSocketError GAddress_INET_SetHostAddress(GAddress *address,
unsigned long hostaddr) unsigned long hostaddr)
{ {
struct in_addr *addr;
assert(address != NULL); assert(address != NULL);
CHECK_ADDRESS(address, INET, GSOCK_INVADDR); CHECK_ADDRESS(address, INET, GSOCK_INVADDR);
@@ -1354,7 +1340,6 @@ service_entry gServices[] =
GSocketError GAddress_INET_SetPortName(GAddress *address, const char *port, GSocketError GAddress_INET_SetPortName(GAddress *address, const char *port,
const char *protocol) const char *protocol)
{ {
InetAddress *addr;
int i ; int i ;
assert(address != NULL); assert(address != NULL);
@@ -1389,8 +1374,6 @@ GSocketError GAddress_INET_SetPortName(GAddress *address, const char *port,
GSocketError GAddress_INET_SetPort(GAddress *address, unsigned short port) GSocketError GAddress_INET_SetPort(GAddress *address, unsigned short port)
{ {
InetAddress *addr;
assert(address != NULL); assert(address != NULL);
CHECK_ADDRESS(address, INET, GSOCK_INVADDR); CHECK_ADDRESS(address, INET, GSOCK_INVADDR);
address->m_port = port ; address->m_port = port ;

View File

@@ -202,8 +202,6 @@ bool wxClipboard::AddData( wxDataObject *data )
wxCHECK_MSG( data, FALSE, wxT("data is invalid") ); wxCHECK_MSG( data, FALSE, wxT("data is invalid") );
wxDataFormat format = data->GetPreferredFormat();
/* we can only store one wxDataObject */ /* we can only store one wxDataObject */
Clear(); Clear();
@@ -336,7 +334,7 @@ bool wxClipboard::GetData( wxDataObject& data )
{ {
wxCHECK_MSG( m_open, FALSE, wxT("clipboard not open") ); wxCHECK_MSG( m_open, FALSE, wxT("clipboard not open") );
int formatcount = data.GetFormatCount() + 1 ; size_t formatcount = data.GetFormatCount() + 1 ;
wxDataFormat *array = new wxDataFormat[ formatcount ]; wxDataFormat *array = new wxDataFormat[ formatcount ];
array[0] = data.GetPreferredFormat(); array[0] = data.GetPreferredFormat();
data.GetAllFormats( &array[1] ); data.GetAllFormats( &array[1] );

View File

@@ -262,10 +262,6 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
const wxValidator& validator, const wxValidator& validator,
const wxString& name) const wxString& name)
{ {
Rect bounds ;
Str255 title ;
if ( !wxControl::Create(parent, id, wxDefaultPosition, wxDefaultSize, style , if ( !wxControl::Create(parent, id, wxDefaultPosition, wxDefaultSize, style ,
wxDefaultValidator, name) ) wxDefaultValidator, name) )
{ {

View File

@@ -819,7 +819,6 @@ void wxControl::OnMouseEvent( wxMouseEvent &event )
ControlHandle control ; ControlHandle control ;
Point localwhere ; Point localwhere ;
SInt16 controlpart ; SInt16 controlpart ;
WindowRef window = (WindowRef) MacGetRootWindow() ;
localwhere.h = x ; localwhere.h = x ;
localwhere.v = y ; localwhere.v = y ;
@@ -840,20 +839,7 @@ void wxControl::OnMouseEvent( wxMouseEvent &event )
if ( event.m_metaDown ) if ( event.m_metaDown )
modifiers |= cmdKey ; modifiers |= cmdKey ;
/*
#if TARGET_CARBON
control = FindControlUnderMouse( localwhere , window , &controlpart ) ;
#else
controlpart = FindControl( localwhere , window , &control ) ;
#endif
*/
{ {
/*
if ( AcceptsFocus() && FindFocus() != this )
{
SetFocus() ;
}
*/
control = (ControlHandle) m_macControl ; control = (ControlHandle) m_macControl ;
if ( control && ::IsControlActive( control ) ) if ( control && ::IsControlActive( control ) )
{ {

View File

@@ -958,8 +958,8 @@ void wxDC::DoDrawPolygon(int n, wxPoint points[],
PolyHandle polygon = OpenPoly(); PolyHandle polygon = OpenPoly();
x1 = XLOG2DEVMAC(points[0].x + xoffset); x2 = x1 = XLOG2DEVMAC(points[0].x + xoffset);
y1 = YLOG2DEVMAC(points[0].y + yoffset); y2 = y1 = YLOG2DEVMAC(points[0].y + yoffset);
::MoveTo(x1,y1); ::MoveTo(x1,y1);
for (int i = 1; i < n; i++) for (int i = 1; i < n; i++)
@@ -1439,7 +1439,7 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
if ( 0 ) if ( 0 )
{ {
m_macFormerAliasState = IsAntiAliasedTextEnabled(&m_macFormerAliasSize); m_macFormerAliasState = IsAntiAliasedTextEnabled(&m_macFormerAliasSize);
SetAntiAliasedTextEnabled(true, m_scaleY * font->m_macFontSize); SetAntiAliasedTextEnabled(true, SInt16(m_scaleY * font->m_macFontSize));
m_macAliasWasEnabled = true ; m_macAliasWasEnabled = true ;
} }
@@ -1467,9 +1467,10 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
&chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ; &chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ;
wxASSERT_MSG( status == noErr , "couldn't create the layout of the rotated text" ); wxASSERT_MSG( status == noErr , "couldn't create the layout of the rotated text" );
if ( abs(angle) > 0 ) int iAngle = int( angle );
if ( abs(iAngle) > 0 )
{ {
Fixed atsuAngle = IntToFixed( angle ) ; Fixed atsuAngle = IntToFixed( iAngle ) ;
ByteCount angleSize = sizeof(Fixed) ; ByteCount angleSize = sizeof(Fixed) ;
ATSUAttributeTag rotationTag = kATSULineRotationTag ; ATSUAttributeTag rotationTag = kATSULineRotationTag ;
ATSUAttributeValuePtr angleValue = &atsuAngle ; ATSUAttributeValuePtr angleValue = &atsuAngle ;
@@ -1865,7 +1866,7 @@ void wxDC::MacInstallFont() const
OSStatus status = noErr ; OSStatus status = noErr ;
Fixed atsuSize = IntToFixed(m_scaleY * font->m_macFontSize) ; Fixed atsuSize = IntToFixed( int(m_scaleY * font->m_macFontSize) ) ;
Style qdStyle = font->m_macFontStyle ; Style qdStyle = font->m_macFontStyle ;
ATSUFontID atsuFont = font->m_macATSUFontID ; ATSUFontID atsuFont = font->m_macATSUFontID ;
@@ -1934,13 +1935,13 @@ void wxDC::MacInstallFont() const
Pattern gHatchPatterns[] = Pattern gHatchPatterns[] =
{ {
{ 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF } , { { 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF } },
{ 0x01 , 0x02 , 0x04 , 0x08 , 0x10 , 0x20 , 0x40 , 0x80 } , { { 0x01 , 0x02 , 0x04 , 0x08 , 0x10 , 0x20 , 0x40 , 0x80 } },
{ 0x80 , 0x40 , 0x20 , 0x10 , 0x08 , 0x04 , 0x02 , 0x01 } , { { 0x80 , 0x40 , 0x20 , 0x10 , 0x08 , 0x04 , 0x02 , 0x01 } },
{ 0x10 , 0x10 , 0x10 , 0xFF , 0x10 , 0x10 , 0x10 , 0x10 } , { { 0x10 , 0x10 , 0x10 , 0xFF , 0x10 , 0x10 , 0x10 , 0x10 } },
{ 0x00 , 0x00 , 0x00 , 0xFF , 0x00 , 0x00 , 0x00 , 0x00 } , { { 0x00 , 0x00 , 0x00 , 0xFF , 0x00 , 0x00 , 0x00 , 0x00 } },
{ 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 } , { { 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 } },
{ 0x81 , 0x42 , 0x24 , 0x18 , 0x18 , 0x24 , 0x42 , 0x81 } , { { 0x81 , 0x42 , 0x24 , 0x18 , 0x18 , 0x24 , 0x42 , 0x81 } }
} ; } ;
static void wxMacGetHatchPattern(int hatchStyle, Pattern *pattern) static void wxMacGetHatchPattern(int hatchStyle, Pattern *pattern)
@@ -2040,7 +2041,6 @@ void wxDC::MacInstallPen() const
case wxUSER_DASH : case wxUSER_DASH :
{ {
wxDash* dash ; wxDash* dash ;
int number = m_pen.GetDashes(&dash) ;
// right now we don't allocate larger pixmaps // right now we don't allocate larger pixmaps
for ( int i = 0 ; i < 8 ; ++i ) for ( int i = 0 ; i < 8 ; ++i )
{ {

View File

@@ -150,8 +150,8 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& printdata)
m_ok = FALSE; m_ok = FALSE;
return; return;
} }
m_maxX = rPaper.right - rPaper.left ; m_maxX = wxCoord(rPaper.right - rPaper.left) ;
m_maxY = rPaper.bottom - rPaper.top ; m_maxY = wxCoord(rPaper.bottom - rPaper.top);
#else #else
m_maxX = (**(THPrint)m_printData.m_macPrintSettings).rPaper.right - (**(THPrint)m_printData.m_macPrintSettings).rPaper.left ; m_maxX = (**(THPrint)m_printData.m_macPrintSettings).rPaper.right - (**(THPrint)m_printData.m_macPrintSettings).rPaper.left ;
m_maxY = (**(THPrint)m_printData.m_macPrintSettings).rPaper.bottom - (**(THPrint)m_printData.m_macPrintSettings).rPaper.top ; m_maxY = (**(THPrint)m_printData.m_macPrintSettings).rPaper.bottom - (**(THPrint)m_printData.m_macPrintSettings).rPaper.top ;

View File

@@ -119,6 +119,7 @@ wxDirData::wxDirData(const wxString& dirname)
m_index = 0 ; m_index = 0 ;
OSErr err = FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ; OSErr err = FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ;
wxASSERT_MSG( err == noErr , "Error accessing directory") ;
} }
wxDirData::~wxDirData() wxDirData::~wxDirData()

View File

@@ -132,7 +132,8 @@ bool wxFrame::Enable(bool enable)
if ( m_frameMenuBar && m_frameMenuBar == wxMenuBar::MacGetInstalledMenuBar() ) if ( m_frameMenuBar && m_frameMenuBar == wxMenuBar::MacGetInstalledMenuBar() )
{ {
for ( int i = 0 ; i < m_frameMenuBar->GetMenuCount() ; ++ i ) int iMaxMenu = m_frameMenuBar->GetMenuCount();
for ( int i = 0 ; i < iMaxMenu ; ++ i )
{ {
m_frameMenuBar->EnableTop( i , enable ) ; m_frameMenuBar->EnableTop( i , enable ) ;
} }

View File

@@ -473,9 +473,6 @@ GAddress *GSocket_GetPeer(GSocket *socket)
*/ */
GSocketError GSocket_SetServer(GSocket *sck) GSocketError GSocket_SetServer(GSocket *sck)
{ {
int type;
int arg = 1;
assert(sck != NULL); assert(sck != NULL);
/* must not be in use */ /* must not be in use */
@@ -545,9 +542,6 @@ GSocketError GSocket_SetServer(GSocket *sck)
GSocket *GSocket_WaitConnection(GSocket *socket) GSocket *GSocket_WaitConnection(GSocket *socket)
{ {
GSocket *connection = NULL ; GSocket *connection = NULL ;
GSocketError err;
int arg = 1;
assert(socket != NULL); assert(socket != NULL);
@@ -640,8 +634,6 @@ GSocket *GSocket_WaitConnection(GSocket *socket)
*/ */
GSocketError GSocket_SetNonOriented(GSocket *sck) GSocketError GSocket_SetNonOriented(GSocket *sck)
{ {
int arg = 1;
assert(sck != NULL); assert(sck != NULL);
if (sck->m_endpoint != kOTInvalidEndpointRef ) if (sck->m_endpoint != kOTInvalidEndpointRef )
@@ -726,12 +718,9 @@ GSocketError GSocket_SetNonOriented(GSocket *sck)
*/ */
GSocketError GSocket_Connect(GSocket *sck, GSocketStream stream) GSocketError GSocket_Connect(GSocket *sck, GSocketStream stream)
{ {
int ret;
int arg = 1;
InetAddress addr ; InetAddress addr ;
TEndpointInfo info; TEndpointInfo info;
OTFlags flags = 0; OSStatus err = kOTNoError;
OSStatus err = kOTNoError;
TCall peer ; TCall peer ;
assert(sck != NULL); assert(sck != NULL);
@@ -932,7 +921,6 @@ int GSocket_Write(GSocket *socket, const char *buffer, int size)
*/ */
GSocketEventFlags GSocket_Select(GSocket *socket, GSocketEventFlags flags) GSocketEventFlags GSocket_Select(GSocket *socket, GSocketEventFlags flags)
{ {
OTResult state ;
assert(socket != NULL); assert(socket != NULL);
wxMacProcessNotifierEvents() ; wxMacProcessNotifierEvents() ;
/* /*
@@ -1327,8 +1315,6 @@ GSocketError GAddress_INET_SetAnyAddress(GAddress *address)
GSocketError GAddress_INET_SetHostAddress(GAddress *address, GSocketError GAddress_INET_SetHostAddress(GAddress *address,
unsigned long hostaddr) unsigned long hostaddr)
{ {
struct in_addr *addr;
assert(address != NULL); assert(address != NULL);
CHECK_ADDRESS(address, INET, GSOCK_INVADDR); CHECK_ADDRESS(address, INET, GSOCK_INVADDR);
@@ -1354,7 +1340,6 @@ service_entry gServices[] =
GSocketError GAddress_INET_SetPortName(GAddress *address, const char *port, GSocketError GAddress_INET_SetPortName(GAddress *address, const char *port,
const char *protocol) const char *protocol)
{ {
InetAddress *addr;
int i ; int i ;
assert(address != NULL); assert(address != NULL);
@@ -1389,8 +1374,6 @@ GSocketError GAddress_INET_SetPortName(GAddress *address, const char *port,
GSocketError GAddress_INET_SetPort(GAddress *address, unsigned short port) GSocketError GAddress_INET_SetPort(GAddress *address, unsigned short port)
{ {
InetAddress *addr;
assert(address != NULL); assert(address != NULL);
CHECK_ADDRESS(address, INET, GSOCK_INVADDR); CHECK_ADDRESS(address, INET, GSOCK_INVADDR);
address->m_port = port ; address->m_port = port ;

View File

@@ -260,7 +260,7 @@ static void CopyLevel(long sourceDirID,
long dstDirID, long dstDirID,
EnumerateGlobals *theGlobals) EnumerateGlobals *theGlobals)
{ {
long currentSrcDirID; long currentSrcDirID = 0 ;
long newDirID; long newDirID;
short index = 1; short index = 1;
@@ -325,6 +325,7 @@ static void CopyLevel(long sourceDirID,
} }
else /* error handling for DirCreate */ else /* error handling for DirCreate */
{ {
/* note that currentSrcDirID has not been initialised when entering this execution path */
if ( theGlobals->errorHandler != NULL ) if ( theGlobals->errorHandler != NULL )
{ {
theGlobals->bailout = CallCopyErrProc(theGlobals->errorHandler, theGlobals->error, dirCreateOp, theGlobals->bailout = CallCopyErrProc(theGlobals->errorHandler, theGlobals->error, dirCreateOp,

View File

@@ -762,7 +762,7 @@ pascal OSErr IndexedSearch(CSParamPtr pb,
static Size searchStackSize = 0; /* size of static handle */ static Size searchStackSize = 0; /* size of static handle */
SearchPositionRecPtr catPosition; SearchPositionRecPtr catPosition;
long modDate; long modDate;
short index; short index = -1 ;
ExtendedTMTask timerTask; ExtendedTMTask timerTask;
OSErr result; OSErr result;
short realVRefNum; short realVRefNum;