From: Vadim Zeitlin Date: Sun, 13 Aug 2006 21:12:50 +0000 (+0000) Subject: corrected signed/unsigned comparison warnings X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/78e9b418daf941cf94360141de078c3c3fb39f6d?ds=inline corrected signed/unsigned comparison warnings git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/platinfo.cpp b/src/common/platinfo.cpp index 998d0e964e..4a6c50aa1d 100644 --- a/src/common/platinfo.cpp +++ b/src/common/platinfo.cpp @@ -92,9 +92,9 @@ static wxString wxEndiannessNames[] = // returns log in base 2 of the value, this maps the enum values to the // corresponding indices -static int wxGetIndexFromEnumValue(int value) +static unsigned wxGetIndexFromEnumValue(int value) { - wxCHECK_MSG( value, -1, _T("invalid enum value") ); + wxCHECK_MSG( value, (unsigned)-1, _T("invalid enum value") ); int n = 0; while ( !(value & 1) ) @@ -185,7 +185,7 @@ wxString wxPlatformInfo::GetOperatingSystemFamilyName(wxOperatingSystemId os) wxString wxPlatformInfo::GetOperatingSystemIdName(wxOperatingSystemId os) { - const int idx = wxGetIndexFromEnumValue(os); + const unsigned idx = wxGetIndexFromEnumValue(os); wxCHECK_MSG( idx < WXSIZEOF(wxOperatingSystemIdNames), wxEmptyString, _T("invalid OS id") ); @@ -195,7 +195,7 @@ wxString wxPlatformInfo::GetOperatingSystemIdName(wxOperatingSystemId os) wxString wxPlatformInfo::GetPortIdName(wxPortId port) { - const int idx = wxGetIndexFromEnumValue(port); + const unsigned idx = wxGetIndexFromEnumValue(port); wxCHECK_MSG( idx < WXSIZEOF(wxPortIdNames), wxEmptyString, _T("invalid port id") ); @@ -210,7 +210,7 @@ wxString wxPlatformInfo::GetPortIdName(wxPortId port) wxString wxPlatformInfo::GetPortIdShortName(wxPortId port) { - const int idx = wxGetIndexFromEnumValue(port); + const unsigned idx = wxGetIndexFromEnumValue(port); wxCHECK_MSG( idx < WXSIZEOF(wxPortIdNames), wxEmptyString, _T("invalid port id") );