[PATCH] D27785: [libcxx] [test] Fix recently introduced warnings emitted by MSVC.

Stephan T. Lavavej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 14 16:48:36 PST 2016


STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

[libcxx] [test] Fix recently introduced warnings emitted by MSVC.

test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp
test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp
test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_rvalue.pass.cpp
test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_values.pass.cpp
These tests were using malloc()'s return value without checking for null,
which MSVC's /analyze rightly warns about. Asserting that the pointer is
non-null both expresses the test's intention and silences the warning.

test/support/controlled_allocators.hpp
Fix two unreferenced parameters by removing their names, and one unused variable by void-casting it.

test/support/uses_alloc_types.hpp
Fix an unreferenced function parameter pack by removing its name.


https://reviews.llvm.org/D27785

Files:
  test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp
  test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp
  test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_rvalue.pass.cpp
  test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_values.pass.cpp
  test/support/controlled_allocators.hpp
  test/support/uses_alloc_types.hpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27785.81497.patch
Type: text/x-patch
Size: 8373 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161215/09816e79/attachment.bin>


More information about the cfe-commits mailing list