Resolve assorted GCC 7 warnings
This commit is contained in:
parent
e04b97132b
commit
76868c5ccc
|
@ -568,7 +568,7 @@ TCHAR cCharEncoderUtil::hex_to_char( TSTRING::const_iterator first,
|
||||||
|
|
||||||
if( ss.bad() || ss.fail() )
|
if( ss.bad() || ss.fail() )
|
||||||
ThrowAndAssert( eBadHexConversion( TSTRING( first, last ) ) );
|
ThrowAndAssert( eBadHexConversion( TSTRING( first, last ) ) );
|
||||||
if( (TCHAR)ch > max_char || (TCHAR)ch < min_char )
|
if( ch > (unsigned long)max_char || ch < (unsigned long)min_char )
|
||||||
ThrowAndAssert( eBadHexConversion( TSTRING( first, last ) ) );
|
ThrowAndAssert( eBadHexConversion( TSTRING( first, last ) ) );
|
||||||
|
|
||||||
return (TCHAR)ch;
|
return (TCHAR)ch;
|
||||||
|
|
|
@ -96,7 +96,7 @@ tss::mbsdec( const_ntmbs_t beg, const_ntmbs_t curr )
|
||||||
const_ntmbs_t prev = curr - 1;
|
const_ntmbs_t prev = curr - 1;
|
||||||
for ( ; prev > beg && ::mblen( (char*)prev, curr - prev ) == -1; --prev );
|
for ( ; prev > beg && ::mblen( (char*)prev, curr - prev ) == -1; --prev );
|
||||||
|
|
||||||
if ( curr - prev > MB_CUR_MAX )
|
if ( (size_t)(curr - prev) > MB_CUR_MAX )
|
||||||
{
|
{
|
||||||
prev = (curr - 1);
|
prev = (curr - 1);
|
||||||
|
|
||||||
|
|
|
@ -158,6 +158,8 @@ bool GenerateKey(const TCHAR* keyPath, wc16_string passphrase, const cElGamalSig
|
||||||
{
|
{
|
||||||
case tGK::FILE_WRITE_ERROR:
|
case tGK::FILE_WRITE_ERROR:
|
||||||
TCERR << std::endl << TSS_GetString(cTWAdmin, twadmin::STR_ERR2_KEYGEN_FILEWRITE) << gk.keyPath << std::endl;
|
TCERR << std::endl << TSS_GetString(cTWAdmin, twadmin::STR_ERR2_KEYGEN_FILEWRITE) << gk.keyPath << std::endl;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
TCERR << std::endl << TSS_GetString(cTWAdmin, twadmin::STR_ERR2_KEYGEN) << gk.keyPath
|
TCERR << std::endl << TSS_GetString(cTWAdmin, twadmin::STR_ERR2_KEYGEN) << gk.keyPath
|
||||||
<< TSS_GetString(cTWAdmin, twadmin::STR_ERR2_KEYGEN2) << std::endl;
|
<< TSS_GetString(cTWAdmin, twadmin::STR_ERR2_KEYGEN2) << std::endl;
|
||||||
|
|
Loading…
Reference in New Issue