oc_logger: Removing /W4 warnings
authorPawel Winogrodzki <pawelwi@microsoft.com>
Mon, 12 Jun 2017 22:26:38 +0000 (15:26 -0700)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Fri, 16 Jun 2017 19:28:40 +0000 (19:28 +0000)
Disabling "unreachable code" warning for a known issue
inside a boost header.

See: https://svn.boost.org/trac/boost/ticket/5904.

Bug: https://jira.iotivity.org/browse/IOT-1583

Change-Id: Ic313fd1debc9df73eca2d747d6eda1b883b7b9be
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20729
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
resource/oc_logger/include/oc_log_stream.hpp

index e6c8c2c..b794665 100644 (file)
 #include <iostream>
 
 #include <boost/config.hpp>
+
+// Warning disabled due to a known "unreachable code" issue in boost iostreams.
+// For more information see: https://svn.boost.org/trac/boost/ticket/5904
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable : 4702)
+#endif
+
 #include <boost/iostreams/stream.hpp>
+
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif
+
 #include <boost/iostreams/categories.hpp>
 #include <boost/iostreams/detail/ios.hpp>