More tweaks vis-a-vis warnings

Move crc_c fake usage out of strange main() function in a library
Convert manual string formatting to FC string formatting
This commit is contained in:
Nathan Hourt 2019-03-25 09:26:35 -05:00
parent 04c393a53a
commit 2d0122f1ed
2 changed files with 3 additions and 3 deletions

View file

@ -606,6 +606,8 @@ static const uint32_t crc_c[256] = {
uint64_t _mm_crc32_u64(uint64_t a, uint64_t b )
{
// Squelch warning about unusued variable crc_c
(void)(crc_c);
return crc32cSlicingBy8(a, (unsigned char*)&b, sizeof(b));
}
/*
@ -615,8 +617,6 @@ uint64_t _mm_crc32_u64(uint64_t a, uint64_t b )
int main( int argc, char** argv )
{
// Squelch warning about unusued variable crc_c
(void)(crc_c);
uint64_t f = 0x1234;
uint64_t a = 0x5678;
uint32_t f1 = _mm_crc32_u64(f, a);

View file

@ -171,7 +171,7 @@ static bool equal( const fc::variant& a, const fc::variant& b )
return true;
case fc::variant::type_id::blob_type:
default:
FC_THROW_EXCEPTION( fc::invalid_arg_exception, "Unsupported variant type: " + std::to_string( a.get_type() ) );
FC_THROW_EXCEPTION( fc::invalid_arg_exception, "Unsupported variant type: {t}", ( "t", a.get_type() ) );
}
}