From 7c8d4f23ce7a6944bdcf08907016d34a942f707a Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Mon, 5 Aug 2002 11:16:14 +0000 Subject: [PATCH] clear un/signed warnings [SVN r14692] --- test/config_info.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/config_info.cpp b/test/config_info.cpp index b00a0605..732525bf 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -87,9 +87,9 @@ void print_byte_order(const char* what, T /* t */ ) template void print_sign(const char* what, T t) { - t = -1; + t = static_cast(-1); // cast suppresses warnings for(unsigned i = 0; i < indent; ++i) std::cout.put(' '); - std::cout << "Type " << what << " is " << ((t < 0) ? "signed" : "unsigned") << std::endl; + std::cout << "Type " << what << " is " << ((t > 0) ? "unsigned" : "signed") << std::endl; } #define PRINT_SIGN(T) print_sign(#T, T())