mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-05-28 15:14:11 +02:00
Propagated CXXFLAGS.
Fixed warnings.
This commit is contained in:
parent
71687c4229
commit
c8a053557c
@ -26,7 +26,7 @@ else
|
||||
export ARCH_FLAG="-m64"
|
||||
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=$?
|
||||
if [ $ret -ne 0 ]
|
||||
|
@ -21,11 +21,23 @@
|
||||
#include "msgpack/adaptor/cpp11/tuple.hpp"
|
||||
#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/sequence/intrinsic/size.hpp>
|
||||
#include <boost/fusion/algorithm/iteration/for_each.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/at.hpp>
|
||||
#include <boost/fusion/include/mpl.hpp>
|
||||
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif // defined(__GNUC__)
|
||||
|
||||
|
||||
#include <boost/mpl/size.hpp>
|
||||
|
||||
namespace msgpack {
|
||||
|
@ -26,7 +26,18 @@
|
||||
#include "msgpack/adaptor/vector.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>
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif // defined(__GNUC__)
|
||||
|
||||
#include <boost/operators.hpp>
|
||||
|
||||
namespace msgpack {
|
||||
|
@ -14,6 +14,11 @@
|
||||
#include "msgpack/adaptor/adaptor_base.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
|
||||
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
@ -26,6 +31,10 @@
|
||||
#pragma GCC diagnostic pop
|
||||
#endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__clang__)
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif // defined(__GNUC__)
|
||||
|
||||
namespace msgpack {
|
||||
|
||||
/// @cond
|
||||
|
@ -1461,7 +1461,7 @@ TEST(MSGPACK_TIMESPEC, timespec_object_with_zone_zero)
|
||||
TEST(MSGPACK_TIMESPEC, timespec_pack_convert_32bit_sec)
|
||||
{
|
||||
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);
|
||||
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)
|
||||
{
|
||||
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);
|
||||
timespec val2 = obj.as<timespec>();
|
||||
EXPECT_EQ(val1.tv_sec, val2.tv_sec);
|
||||
|
Loading…
x
Reference in New Issue
Block a user