From patchwork Tue Aug 31 17:25:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v3] Minor -Wall -m32 fixes Date: Tue, 31 Aug 2010 07:25:41 -0000 From: Paolo Carlini X-Patchwork-Id: 63304 Message-Id: <4C7D3B15.3030103@oracle.com> To: "gcc-patches@gcc.gnu.org" Cc: libstdc++ Hi, committed to mainline. Paolo. ////////////////// 2010-08-31 Paolo Carlini * testsuite/23_containers/forward_list/operations/remove_freed.cc: Fix test01 return type to void. * testsuite/util/exception/safety.h: Avoid -Wall -m32 warnings. * testsuite/util/replacement_memory_operators.h: Likewise. Index: testsuite/23_containers/forward_list/operations/remove_freed.cc =================================================================== --- testsuite/23_containers/forward_list/operations/remove_freed.cc (revision 163676) +++ testsuite/23_containers/forward_list/operations/remove_freed.cc (working copy) @@ -25,7 +25,7 @@ // 23.3.3.5 forward_list operations [forwardlist.ops] // Used to cause many Valgrind errors: LWG 526-type situation. -int test01() +void test01() { bool test __attribute__((unused)) = true; Index: testsuite/util/exception/safety.h =================================================================== --- testsuite/util/exception/safety.h (revision 163676) +++ testsuite/util/exception/safety.h (working copy) @@ -52,13 +52,13 @@ __s += "\n"; __s += "random number generated is: "; char buf[40]; - __builtin_sprintf(buf, "%lu", random); + __builtin_sprintf(buf, "%lu", (unsigned long)random); __s += buf; __s += " on range ["; - __builtin_sprintf(buf, "%lu", distribution.min()); + __builtin_sprintf(buf, "%lu", (unsigned long)distribution.min()); __s += buf; __s += ", "; - __builtin_sprintf(buf, "%lu", distribution.max()); + __builtin_sprintf(buf, "%lu", (unsigned long)distribution.max()); __s += buf; __s += "]\n"; std::__throw_out_of_range(__s.c_str()); Index: testsuite/util/replacement_memory_operators.h =================================================================== --- testsuite/util/replacement_memory_operators.h (revision 163676) +++ testsuite/util/replacement_memory_operators.h (working copy) @@ -108,6 +108,6 @@ if (count == 0) std::printf("All memory released \n"); else - std::printf("%lu allocations to be released \n", count); + std::printf("%lu allocations to be released \n", (unsigned long)count); } }