getting rid of warnings

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2002-08-24 17:20:12 +00:00
parent 49b45dcd85
commit 8140eec95a
4 changed files with 26 additions and 10 deletions

View File

@@ -538,7 +538,7 @@ bool wxPNGReader::ReadFile(char * ImageFileName)
{ {
if ( pixel_depth == 8 ) if ( pixel_depth == 8 )
{ {
for ( int i = 0 ; i < info_ptr->width ; ++i ) for ( size_t i = 0 ; i < info_ptr->width ; ++i )
{ {
png_color_struct* color ; png_color_struct* color ;
RGBColor col ; RGBColor col ;
@@ -582,7 +582,7 @@ bool wxPNGReader::ReadFile(char * ImageFileName)
} }
else else
{ {
for ( int i = 0 ; i < info_ptr->width ; ++i ) for ( size_t i = 0 ; i < info_ptr->width ; ++i )
{ {
png_color_struct* color ; png_color_struct* color ;
RGBColor col ; RGBColor col ;
@@ -601,7 +601,7 @@ bool wxPNGReader::ReadFile(char * ImageFileName)
} }
else else
{ {
for ( int i = 0 ; i < info_ptr->width ; ++i ) for ( size_t i = 0 ; i < info_ptr->width ; ++i )
{ {
png_color_struct* color ; png_color_struct* color ;
RGBColor col ; RGBColor col ;

View File

@@ -15,6 +15,11 @@
#include "wx/defs.h" #include "wx/defs.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#endif // WX_PRECOMP
#include "wx/scrolbar.h" #include "wx/scrolbar.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
@@ -134,12 +139,15 @@ void wxScrollBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart
nScrollInc = 0 ; nScrollInc = 0 ;
scrollEvent = wxEVT_SCROLL_THUMBTRACK; scrollEvent = wxEVT_SCROLL_THUMBTRACK;
break ; break ;
default :
wxLogError(_("illegal scrollbar selector %d"), controlpart);
break ;
} }
int new_pos = position + nScrollInc; int new_pos = position + nScrollInc;
if (new_pos < 0) if (new_pos < minPos)
new_pos = 0; new_pos = minPos;
if (new_pos > maxPos) if (new_pos > maxPos)
new_pos = maxPos; new_pos = maxPos;
if ( nScrollInc ) if ( nScrollInc )

View File

@@ -538,7 +538,7 @@ bool wxPNGReader::ReadFile(char * ImageFileName)
{ {
if ( pixel_depth == 8 ) if ( pixel_depth == 8 )
{ {
for ( int i = 0 ; i < info_ptr->width ; ++i ) for ( size_t i = 0 ; i < info_ptr->width ; ++i )
{ {
png_color_struct* color ; png_color_struct* color ;
RGBColor col ; RGBColor col ;
@@ -582,7 +582,7 @@ bool wxPNGReader::ReadFile(char * ImageFileName)
} }
else else
{ {
for ( int i = 0 ; i < info_ptr->width ; ++i ) for ( size_t i = 0 ; i < info_ptr->width ; ++i )
{ {
png_color_struct* color ; png_color_struct* color ;
RGBColor col ; RGBColor col ;
@@ -601,7 +601,7 @@ bool wxPNGReader::ReadFile(char * ImageFileName)
} }
else else
{ {
for ( int i = 0 ; i < info_ptr->width ; ++i ) for ( size_t i = 0 ; i < info_ptr->width ; ++i )
{ {
png_color_struct* color ; png_color_struct* color ;
RGBColor col ; RGBColor col ;

View File

@@ -15,6 +15,11 @@
#include "wx/defs.h" #include "wx/defs.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#endif // WX_PRECOMP
#include "wx/scrolbar.h" #include "wx/scrolbar.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
@@ -134,12 +139,15 @@ void wxScrollBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart
nScrollInc = 0 ; nScrollInc = 0 ;
scrollEvent = wxEVT_SCROLL_THUMBTRACK; scrollEvent = wxEVT_SCROLL_THUMBTRACK;
break ; break ;
default :
wxLogError(_("illegal scrollbar selector %d"), controlpart);
break ;
} }
int new_pos = position + nScrollInc; int new_pos = position + nScrollInc;
if (new_pos < 0) if (new_pos < minPos)
new_pos = 0; new_pos = minPos;
if (new_pos > maxPos) if (new_pos > maxPos)
new_pos = maxPos; new_pos = maxPos;
if ( nScrollInc ) if ( nScrollInc )