diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-05-05 20:32:26 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-05-05 20:32:26 +0000 |
commit | 799d02d2f3f96bf4bd00aacc19bfb636ce8acb20 (patch) | |
tree | bef6c2d0d45adb62f131e9b2a41372edc0ee393d /src | |
parent | b3b66a4d811532a0c56a1ecffd7c58af804e2562 (diff) |
Fix new warnings emitted by GCC 7
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302280 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src')
-rw-r--r-- | src/locale.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/locale.cpp b/src/locale.cpp index 1460f9662..1ed9b41fd 100644 --- a/src/locale.cpp +++ b/src/locale.cpp @@ -68,8 +68,8 @@ T& make(A0 a0) { static typename aligned_storage<sizeof(T)>::type buf; - ::new (&buf) T(a0); - return *reinterpret_cast<T*>(&buf); + auto *obj = ::new (&buf) T(a0); + return *obj; } template <class T, class A0, class A1> @@ -88,8 +88,8 @@ T& make(A0 a0, A1 a1, A2 a2) { static typename aligned_storage<sizeof(T)>::type buf; - ::new (&buf) T(a0, a1, a2); - return *reinterpret_cast<T*>(&buf); + auto *obj = ::new (&buf) T(a0, a1, a2); + return *obj; } template <typename T, size_t N> @@ -480,8 +480,8 @@ locale::__imp::make_global() { // only one thread can get in here and it only gets in once static aligned_storage<sizeof(locale)>::type buf; - ::new (&buf) locale(locale::classic()); - return *reinterpret_cast<locale*>(&buf); + auto *obj = ::new (&buf) locale(locale::classic()); + return *obj; } locale& |