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), "");
|
||||
|
||||
Reference in New Issue
Block a user