File: 0002-Fixed-494.patch

package info (click to toggle)
msgpack-c 1.4.2-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,448 kB
  • ctags: 23,997
  • sloc: cpp: 74,169; ansic: 6,333; sh: 4,181; makefile: 619
file content (29 lines) | stat: -rw-r--r-- 1,234 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From cf6fddf6bf40783e4ae4c7602d1e005f320b0dd3 Mon Sep 17 00:00:00 2001
From: Takatoshi Kondo <redboltz@gmail.com>
Date: Fri, 22 Jul 2016 16:00:50 +0900
Subject: [PATCH 2/2] Fixed #494.

Added false positive warinig suppression code for user_class.cpp.
---
 test/user_class.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/test/user_class.cpp b/test/user_class.cpp
index f8ad20f..efe0eb4 100644
--- a/test/user_class.cpp
+++ b/test/user_class.cpp
@@ -382,7 +382,14 @@ TEST(MSGPACK_INHERIT, define_map_non_virtual)
     msgpack::pack(sbuf, b);
     msgpack::unpacked ret;
     msgpack::unpack(ret, sbuf.data(), sbuf.size());
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && !defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && !defined(__clang__)
     dm_bottom br = ret.get().as<dm_bottom>();
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && !defined(__clang__)
+#pragma GCC diagnostic pop
+#endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && !defined(__clang__)
     EXPECT_EQ(b.b, br.b);
     EXPECT_EQ(b.m1, br.m1);
     EXPECT_EQ(b.m2, br.m2);