mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-05-29 15:34:08 +02:00
Propagated CXXFLAGS.
Fixed warnings.
This commit is contained in:
parent
71687c4229
commit
c8a053557c
@ -26,7 +26,7 @@ else
|
|||||||
export ARCH_FLAG="-m64"
|
export ARCH_FLAG="-m64"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cmake -DMSGPACK_CXX11=${CXX11} -DMSGPACK_CXX17=${CXX17} -DMSGPACK_32BIT=${BIT32} -DMSGPACK_CHAR_SIGN=${CHAR_SIGN} -DMSGPACK_DEFAULT_API_VERSION=${API_VERSION} -DMSGPACK_USE_X3_PARSE=${X3_PARSE} -DCMAKE_CXX_FLAGS=${ARCH_FLAG} ${ZLIB32} -fsanitize=undefined ..
|
cmake -DMSGPACK_CXX11=${CXX11} -DMSGPACK_CXX17=${CXX17} -DMSGPACK_32BIT=${BIT32} -DMSGPACK_CHAR_SIGN=${CHAR_SIGN} -DMSGPACK_DEFAULT_API_VERSION=${API_VERSION} -DMSGPACK_USE_X3_PARSE=${X3_PARSE} -DCMAKE_CXX_FLAGS="${ARCH_FLAG} ${CXXFLAGS} -fsanitize=undefined" ${ZLIB32} ..
|
||||||
|
|
||||||
ret=$?
|
ret=$?
|
||||||
if [ $ret -ne 0 ]
|
if [ $ret -ne 0 ]
|
||||||
|
@ -21,11 +21,23 @@
|
|||||||
#include "msgpack/adaptor/cpp11/tuple.hpp"
|
#include "msgpack/adaptor/cpp11/tuple.hpp"
|
||||||
#endif // #if !defined (MSGPACK_USE_CPP03)
|
#endif // #if !defined (MSGPACK_USE_CPP03)
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif // defined(__GNUC__)
|
||||||
|
|
||||||
#include <boost/fusion/support/is_sequence.hpp>
|
#include <boost/fusion/support/is_sequence.hpp>
|
||||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||||
#include <boost/fusion/algorithm/iteration/for_each.hpp>
|
#include <boost/fusion/algorithm/iteration/for_each.hpp>
|
||||||
#include <boost/fusion/sequence/intrinsic/at.hpp>
|
#include <boost/fusion/sequence/intrinsic/at.hpp>
|
||||||
#include <boost/fusion/include/mpl.hpp>
|
#include <boost/fusion/include/mpl.hpp>
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif // defined(__GNUC__)
|
||||||
|
|
||||||
|
|
||||||
#include <boost/mpl/size.hpp>
|
#include <boost/mpl/size.hpp>
|
||||||
|
|
||||||
namespace msgpack {
|
namespace msgpack {
|
||||||
|
@ -26,7 +26,18 @@
|
|||||||
#include "msgpack/adaptor/vector.hpp"
|
#include "msgpack/adaptor/vector.hpp"
|
||||||
#include "msgpack/adaptor/map.hpp"
|
#include "msgpack/adaptor/map.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif // defined(__GNUC__)
|
||||||
|
|
||||||
#include <boost/variant.hpp>
|
#include <boost/variant.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif // defined(__GNUC__)
|
||||||
|
|
||||||
#include <boost/operators.hpp>
|
#include <boost/operators.hpp>
|
||||||
|
|
||||||
namespace msgpack {
|
namespace msgpack {
|
||||||
|
@ -14,6 +14,11 @@
|
|||||||
#include "msgpack/adaptor/adaptor_base.hpp"
|
#include "msgpack/adaptor/adaptor_base.hpp"
|
||||||
#include "msgpack/adaptor/check_container_size.hpp"
|
#include "msgpack/adaptor/check_container_size.hpp"
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
|
#endif // defined(__GNUC__)
|
||||||
|
|
||||||
// To suppress warning on Boost.1.58.0
|
// To suppress warning on Boost.1.58.0
|
||||||
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__clang__)
|
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__clang__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
@ -26,6 +31,10 @@
|
|||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__clang__)
|
#endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__clang__)
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif // defined(__GNUC__)
|
||||||
|
|
||||||
namespace msgpack {
|
namespace msgpack {
|
||||||
|
|
||||||
/// @cond
|
/// @cond
|
||||||
|
@ -1461,7 +1461,7 @@ TEST(MSGPACK_TIMESPEC, timespec_object_with_zone_zero)
|
|||||||
TEST(MSGPACK_TIMESPEC, timespec_pack_convert_32bit_sec)
|
TEST(MSGPACK_TIMESPEC, timespec_pack_convert_32bit_sec)
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
timespec val1{ std::numeric_limits<decltype(std::declval<timespec>().tv_sec)>::is_signed ? INT32_MAX : UINT32_MAX, 0 };
|
timespec val1{ std::numeric_limits<decltype(std::declval<timespec>().tv_sec)>::is_signed ? time_t(INT32_MAX) : time_t(UINT32_MAX), 0 };
|
||||||
|
|
||||||
msgpack::pack(ss, val1);
|
msgpack::pack(ss, val1);
|
||||||
std::string const& str = ss.str();
|
std::string const& str = ss.str();
|
||||||
@ -1477,7 +1477,7 @@ TEST(MSGPACK_TIMESPEC, timespec_pack_convert_32bit_sec)
|
|||||||
TEST(MSGPACK_TIMESPEC, timespec_object_with_zone_32bit_sec)
|
TEST(MSGPACK_TIMESPEC, timespec_object_with_zone_32bit_sec)
|
||||||
{
|
{
|
||||||
msgpack::zone z;
|
msgpack::zone z;
|
||||||
timespec val1{ std::numeric_limits<decltype(std::declval<timespec>().tv_sec)>::is_signed ? INT32_MAX : UINT32_MAX, 0 };
|
timespec val1{ std::numeric_limits<decltype(std::declval<timespec>().tv_sec)>::is_signed ? time_t(INT32_MAX) : time_t(UINT32_MAX), 0 };
|
||||||
msgpack::object obj(val1, z);
|
msgpack::object obj(val1, z);
|
||||||
timespec val2 = obj.as<timespec>();
|
timespec val2 = obj.as<timespec>();
|
||||||
EXPECT_EQ(val1.tv_sec, val2.tv_sec);
|
EXPECT_EQ(val1.tv_sec, val2.tv_sec);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user