diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-07-28 17:49:46 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-08-04 11:34:45 -0700 |
commit | 2e1b3325c63cd6c43a10a08acfc54d1fb29a5c03 (patch) | |
tree | bf02e8d37f7ea5ffe28d293ad7bd3b690cc7dae6 /signal.cpp | |
parent | 1b8f1650dc9959ace0df2037f751682e73b5bb1d (diff) |
Warning cleanup
Diffstat (limited to 'signal.cpp')
-rw-r--r-- | signal.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -373,7 +373,7 @@ static int match_signal_name( const wchar_t *canonical, int wcs2sig( const wchar_t *str ) { - int i, res; + int i; wchar_t *end=0; for( i=0; lookup[i].desc ; i++ ) @@ -384,9 +384,9 @@ int wcs2sig( const wchar_t *str ) } } errno=0; - res = wcstol( str, &end, 10 ); - if( !errno && res>=0 && !*end ) - return res; + long res = wcstol( str, &end, 10 ); + if( !errno && res>=0 && res <= INT_MAX && !*end ) + return (int)res; return -1; } |