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:
@@ -108,10 +108,16 @@ int main()
|
||||
{
|
||||
FILE* fp = 0;
|
||||
fpos_t fpos = {0};
|
||||
size_t s = 0; ((void)s);
|
||||
size_t s = 0;
|
||||
char* cp = 0;
|
||||
char arr[] = {'a', 'b'};
|
||||
va_list va;
|
||||
((void)fp); // Prevent unused warning
|
||||
((void)fpos); // Prevent unused warning
|
||||
((void)s); // Prevent unused warning
|
||||
((void)cp); // Prevent unused warning
|
||||
((void)arr); // Prevent unused warning
|
||||
((void)va); // Prevent unused warning
|
||||
static_assert((std::is_same<decltype(remove("")), int>::value), "");
|
||||
static_assert((std::is_same<decltype(rename("","")), int>::value), "");
|
||||
static_assert((std::is_same<decltype(tmpfile()), FILE*>::value), "");
|
||||
|
||||
Reference in New Issue
Block a user