mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 10:07:41 +08:00
Void cast runtime-unused variables. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@268284 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -91,6 +91,11 @@ int main()
|
||||
std::size_t s = 0;
|
||||
char* cp = 0;
|
||||
std::va_list va;
|
||||
((void)fp); // Prevent unused warning
|
||||
((void)fpos); // Prevent unused warning
|
||||
((void)s); // Prevent unused warning
|
||||
((void)cp); // Prevent unused warning
|
||||
((void)va); // Prevent unused warning
|
||||
static_assert((std::is_same<decltype(std::fclose(fp)), int>::value), "");
|
||||
static_assert((std::is_same<decltype(std::fflush(fp)), int>::value), "");
|
||||
static_assert((std::is_same<decltype(std::setbuf(fp,cp)), void>::value), "");
|
||||
|
@@ -56,7 +56,7 @@ void test_hex(const char *expected)
|
||||
assert(str == expected);
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
int main()
|
||||
{
|
||||
|
||||
test_octal<uint16_t>( "177777");
|
||||
|
Reference in New Issue
Block a user