script_core 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (224) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -1
  3. data/ext/enterprise_script_service/libseccomp/.travis.yml +3 -5
  4. data/ext/enterprise_script_service/libseccomp/CHANGELOG +10 -0
  5. data/ext/enterprise_script_service/libseccomp/CREDITS +3 -0
  6. data/ext/enterprise_script_service/libseccomp/README.md +18 -0
  7. data/ext/enterprise_script_service/libseccomp/configure.ac +1 -1
  8. data/ext/enterprise_script_service/libseccomp/include/seccomp-syscalls.h +7 -0
  9. data/ext/enterprise_script_service/libseccomp/src/arch-s390-syscalls.c +16 -0
  10. data/ext/enterprise_script_service/libseccomp/src/arch-s390x-syscalls.c +16 -0
  11. data/ext/enterprise_script_service/libseccomp/tests/.gitignore +1 -0
  12. data/ext/enterprise_script_service/libseccomp/tests/15-basic-resolver.c +3 -3
  13. data/ext/enterprise_script_service/libseccomp/tests/52-basic-load.c +48 -0
  14. data/ext/enterprise_script_service/libseccomp/tests/52-basic-load.py +38 -0
  15. data/ext/enterprise_script_service/libseccomp/tests/52-basic-load.tests +11 -0
  16. data/ext/enterprise_script_service/libseccomp/tests/Makefile.am +6 -3
  17. data/ext/enterprise_script_service/libseccomp/tests/regression +4 -0
  18. data/ext/enterprise_script_service/libseccomp/tools/Makefile.am +0 -3
  19. data/ext/enterprise_script_service/libseccomp/tools/scmp_bpf_sim.c +2 -0
  20. data/ext/enterprise_script_service/mruby/.github/workflows/build.yml +106 -0
  21. data/ext/enterprise_script_service/mruby/.github/workflows/main.yml +24 -0
  22. data/ext/enterprise_script_service/mruby/.gitignore +3 -0
  23. data/ext/enterprise_script_service/mruby/.travis.yml +6 -9
  24. data/ext/enterprise_script_service/mruby/AUTHORS +1 -0
  25. data/ext/enterprise_script_service/mruby/Doxyfile +1 -1
  26. data/ext/enterprise_script_service/mruby/LICENSE +1 -1
  27. data/ext/enterprise_script_service/mruby/README.md +6 -2
  28. data/ext/enterprise_script_service/mruby/appveyor.yml +9 -12
  29. data/ext/enterprise_script_service/mruby/appveyor_config.rb +9 -0
  30. data/ext/enterprise_script_service/mruby/build_config.rb +6 -6
  31. data/ext/enterprise_script_service/mruby/doc/guides/compile.md +6 -2
  32. data/ext/enterprise_script_service/mruby/doc/guides/debugger.md +1 -1
  33. data/ext/enterprise_script_service/mruby/doc/guides/mrbconf.md +4 -8
  34. data/ext/enterprise_script_service/mruby/doc/limitations.md +10 -10
  35. data/ext/enterprise_script_service/mruby/doc/opcode.md +108 -95
  36. data/ext/enterprise_script_service/mruby/examples/targets/build_config_ArduinoDue.rb +2 -2
  37. data/ext/enterprise_script_service/mruby/examples/targets/build_config_IntelEdison.rb +2 -2
  38. data/ext/enterprise_script_service/mruby/examples/targets/build_config_IntelGalileo.rb +2 -2
  39. data/ext/enterprise_script_service/mruby/examples/targets/build_config_RX630.rb +2 -2
  40. data/ext/enterprise_script_service/mruby/examples/targets/build_config_chipKITMax32.rb +2 -2
  41. data/ext/enterprise_script_service/mruby/examples/targets/build_config_dreamcast_shelf.rb +108 -0
  42. data/ext/enterprise_script_service/mruby/include/mrbconf.h +10 -7
  43. data/ext/enterprise_script_service/mruby/include/mruby.h +11 -9
  44. data/ext/enterprise_script_service/mruby/include/mruby/array.h +4 -0
  45. data/ext/enterprise_script_service/mruby/include/mruby/boxing_nan.h +11 -2
  46. data/ext/enterprise_script_service/mruby/include/mruby/boxing_word.h +0 -9
  47. data/ext/enterprise_script_service/mruby/include/mruby/common.h +10 -0
  48. data/ext/enterprise_script_service/mruby/include/mruby/compile.h +11 -3
  49. data/ext/enterprise_script_service/mruby/include/mruby/dump.h +1 -17
  50. data/ext/enterprise_script_service/mruby/include/mruby/irep.h +10 -0
  51. data/ext/enterprise_script_service/mruby/include/mruby/istruct.h +4 -1
  52. data/ext/enterprise_script_service/mruby/include/mruby/khash.h +23 -5
  53. data/ext/enterprise_script_service/mruby/include/mruby/numeric.h +1 -0
  54. data/ext/enterprise_script_service/mruby/include/mruby/ops.h +3 -2
  55. data/ext/enterprise_script_service/mruby/include/mruby/string.h +2 -1
  56. data/ext/enterprise_script_service/mruby/include/mruby/value.h +7 -12
  57. data/ext/enterprise_script_service/mruby/include/mruby/version.h +4 -4
  58. data/ext/enterprise_script_service/mruby/lib/mruby/build.rb +2 -30
  59. data/ext/enterprise_script_service/mruby/lib/mruby/build/command.rb +21 -46
  60. data/ext/enterprise_script_service/mruby/lib/mruby/gem.rb +9 -0
  61. data/ext/enterprise_script_service/mruby/lib/mruby/source.rb +3 -1
  62. data/ext/enterprise_script_service/mruby/mrbgems/default.gembox +7 -0
  63. data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrblib/array.rb +0 -31
  64. data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/test/array.rb +0 -13
  65. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-config/mrbgem.rake +5 -2
  66. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c +0 -1
  67. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h +5 -1
  68. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +5 -1
  69. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +7 -11
  70. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/mrbgem.rake +0 -1
  71. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +6 -2
  72. data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-strip/tools/mruby-strip/mruby-strip.c +6 -2
  73. data/ext/enterprise_script_service/mruby/mrbgems/mruby-class-ext/src/class.c +6 -1
  74. data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/codegen.c +76 -48
  75. data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/parse.y +107 -32
  76. data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/y.tab.c +13153 -0
  77. data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/mrbgem.rake +13 -15
  78. data/ext/enterprise_script_service/mruby/mrbgems/mruby-error/src/exception.c +3 -3
  79. data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/src/eval.c +2 -213
  80. data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/test/eval.rb +21 -0
  81. data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/src/hash-ext.c +1 -3
  82. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/include/mruby/ext/io.h +39 -7
  83. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrbgem.rake +2 -8
  84. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/file_constants.rb +0 -16
  85. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/io.rb +7 -12
  86. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file.c +76 -30
  87. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file_test.c +9 -10
  88. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/io.c +323 -120
  89. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file.rb +18 -12
  90. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/io.rb +32 -0
  91. data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/mruby_io_test.c +57 -49
  92. data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/src/metaprog.c +15 -17
  93. data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/test/metaprog.rb +9 -0
  94. data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/src/method.c +1 -1
  95. data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/src/object.c +3 -12
  96. data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/src/pack.c +113 -10
  97. data/ext/enterprise_script_service/mruby/mrbgems/mruby-print/src/print.c +5 -1
  98. data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/src/proc.c +2 -2
  99. data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/src/rational.c +9 -9
  100. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/src/mrb_sleep.c +1 -1
  101. data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/mrbgem.rake +1 -1
  102. data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/test/sockettest.c +3 -2
  103. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/sprintf.c +61 -24
  104. data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/test/sprintf.rb +5 -23
  105. data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/src/string.c +3 -3
  106. data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/src/symbol.c +1 -1
  107. data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/mrbgem.rake +1 -0
  108. data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/src/time.c +6 -5
  109. data/ext/enterprise_script_service/mruby/mrblib/hash.rb +3 -3
  110. data/ext/enterprise_script_service/mruby/src/array.c +11 -0
  111. data/ext/enterprise_script_service/mruby/src/backtrace.c +2 -2
  112. data/ext/enterprise_script_service/mruby/src/class.c +26 -11
  113. data/ext/enterprise_script_service/mruby/src/codedump.c +4 -0
  114. data/ext/enterprise_script_service/mruby/src/debug.c +8 -5
  115. data/ext/enterprise_script_service/mruby/src/dump.c +3 -65
  116. data/ext/enterprise_script_service/mruby/src/error.c +57 -5
  117. data/ext/enterprise_script_service/mruby/src/etc.c +13 -4
  118. data/ext/enterprise_script_service/mruby/src/fmt_fp.c +98 -21
  119. data/ext/enterprise_script_service/mruby/src/gc.c +10 -275
  120. data/ext/enterprise_script_service/mruby/src/hash.c +5 -6
  121. data/ext/enterprise_script_service/mruby/src/kernel.c +2 -2
  122. data/ext/enterprise_script_service/mruby/src/load.c +56 -30
  123. data/ext/enterprise_script_service/mruby/src/numeric.c +22 -10
  124. data/ext/enterprise_script_service/mruby/src/object.c +12 -4
  125. data/ext/enterprise_script_service/mruby/src/print.c +27 -3
  126. data/ext/enterprise_script_service/mruby/src/proc.c +21 -1
  127. data/ext/enterprise_script_service/mruby/src/state.c +34 -11
  128. data/ext/enterprise_script_service/mruby/src/string.c +69 -35
  129. data/ext/enterprise_script_service/mruby/src/symbol.c +12 -10
  130. data/ext/enterprise_script_service/mruby/src/vm.c +21 -30
  131. data/ext/enterprise_script_service/mruby/tasks/gitlab.rake +19 -22
  132. data/ext/enterprise_script_service/mruby/tasks/mrbgems.rake +1 -1
  133. data/ext/enterprise_script_service/mruby/tasks/toolchains/android.rake +46 -1
  134. data/ext/enterprise_script_service/mruby/tasks/toolchains/gcc.rake +3 -3
  135. data/ext/enterprise_script_service/mruby/tasks/toolchains/openwrt.rake +6 -6
  136. data/ext/enterprise_script_service/mruby/tasks/toolchains/visualcpp.rake +8 -8
  137. data/ext/enterprise_script_service/mruby/test/assert.rb +5 -4
  138. data/ext/enterprise_script_service/mruby/test/t/ensure.rb +8 -26
  139. data/ext/enterprise_script_service/mruby/test/t/exception.rb +2 -2
  140. data/ext/enterprise_script_service/mruby/test/t/kernel.rb +8 -24
  141. data/ext/enterprise_script_service/mruby/travis_config.rb +0 -14
  142. data/ext/enterprise_script_service/msgpack/.github/depends/boost.sh +56 -0
  143. data/ext/enterprise_script_service/msgpack/.github/workflows/coverage.yml +62 -0
  144. data/ext/enterprise_script_service/msgpack/.github/workflows/gha.yml +304 -0
  145. data/ext/enterprise_script_service/msgpack/CHANGELOG.md +11 -0
  146. data/ext/enterprise_script_service/msgpack/CMakeLists.txt +82 -39
  147. data/ext/enterprise_script_service/msgpack/Files.cmake +22 -12
  148. data/ext/enterprise_script_service/msgpack/QUICKSTART-C.md +26 -29
  149. data/ext/enterprise_script_service/msgpack/README.md +3 -2
  150. data/ext/enterprise_script_service/msgpack/appveyor.yml +6 -2
  151. data/ext/enterprise_script_service/msgpack/ci/build_cmake.sh +3 -1
  152. data/ext/enterprise_script_service/msgpack/cmake/CodeCoverage.cmake +55 -0
  153. data/ext/enterprise_script_service/msgpack/codecov.yml +36 -0
  154. data/ext/enterprise_script_service/msgpack/example/CMakeLists.txt +9 -5
  155. data/ext/enterprise_script_service/msgpack/example/boost/CMakeLists.txt +1 -1
  156. data/ext/enterprise_script_service/msgpack/example/c/CMakeLists.txt +17 -6
  157. data/ext/enterprise_script_service/msgpack/example/c/boundary.c +296 -0
  158. data/ext/enterprise_script_service/msgpack/example/c/jsonconv.c +419 -0
  159. data/ext/enterprise_script_service/msgpack/example/c/simple_c.c +1 -1
  160. data/ext/enterprise_script_service/msgpack/example/cpp03/CMakeLists.txt +3 -3
  161. data/ext/enterprise_script_service/msgpack/example/cpp11/CMakeLists.txt +2 -2
  162. data/ext/enterprise_script_service/msgpack/example/x3/CMakeLists.txt +2 -2
  163. data/ext/enterprise_script_service/msgpack/include/msgpack/pack.h +24 -1
  164. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/array_ref.hpp +5 -4
  165. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/boost/optional.hpp +4 -4
  166. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp17/vector_byte.hpp +8 -8
  167. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/map.hpp +4 -4
  168. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/vector.hpp +4 -4
  169. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/vector_char.hpp +8 -8
  170. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/vector_unsigned_char.hpp +8 -8
  171. data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/wstring.hpp +4 -4
  172. data/ext/enterprise_script_service/msgpack/include/msgpack/v3/unpack.hpp +6 -6
  173. data/ext/enterprise_script_service/msgpack/include/msgpack/version_master.h +2 -2
  174. data/ext/enterprise_script_service/msgpack/include/msgpack/zbuffer.h +4 -4
  175. data/ext/enterprise_script_service/msgpack/make_file_list.sh +38 -11
  176. data/ext/enterprise_script_service/msgpack/src/vrefbuffer.c +6 -0
  177. data/ext/enterprise_script_service/msgpack/test/CMakeLists.txt +86 -64
  178. data/ext/enterprise_script_service/msgpack/test/array_ref.cpp +4 -0
  179. data/ext/enterprise_script_service/msgpack/test/boost_fusion.cpp +4 -0
  180. data/ext/enterprise_script_service/msgpack/test/boost_optional.cpp +4 -0
  181. data/ext/enterprise_script_service/msgpack/test/boost_string_ref.cpp +4 -1
  182. data/ext/enterprise_script_service/msgpack/test/boost_string_view.cpp +4 -0
  183. data/ext/enterprise_script_service/msgpack/test/boost_variant.cpp +4 -0
  184. data/ext/enterprise_script_service/msgpack/test/buffer.cpp +4 -47
  185. data/ext/enterprise_script_service/msgpack/test/buffer_c.cpp +148 -0
  186. data/ext/enterprise_script_service/msgpack/test/carray.cpp +4 -0
  187. data/ext/enterprise_script_service/msgpack/test/cases.cpp +8 -4
  188. data/ext/enterprise_script_service/msgpack/test/convert.cpp +8 -4
  189. data/ext/enterprise_script_service/msgpack/test/fixint.cpp +4 -0
  190. data/ext/enterprise_script_service/msgpack/test/fixint_c.cpp +4 -0
  191. data/ext/enterprise_script_service/msgpack/test/fuzz_unpack_pack_fuzzer_cpp11.cpp +4 -0
  192. data/ext/enterprise_script_service/msgpack/test/iterator_cpp11.cpp +4 -0
  193. data/ext/enterprise_script_service/msgpack/test/json.cpp +4 -0
  194. data/ext/enterprise_script_service/msgpack/test/limit.cpp +8 -4
  195. data/ext/enterprise_script_service/msgpack/test/msgpack_basic.cpp +4 -0
  196. data/ext/enterprise_script_service/msgpack/test/msgpack_c.cpp +159 -0
  197. data/ext/enterprise_script_service/msgpack/test/msgpack_container.cpp +4 -0
  198. data/ext/enterprise_script_service/msgpack/test/msgpack_cpp11.cpp +32 -27
  199. data/ext/enterprise_script_service/msgpack/test/msgpack_cpp17.cpp +4 -0
  200. data/ext/enterprise_script_service/msgpack/test/msgpack_stream.cpp +4 -0
  201. data/ext/enterprise_script_service/msgpack/test/msgpack_tuple.cpp +4 -1
  202. data/ext/enterprise_script_service/msgpack/test/msgpack_vref.cpp +4 -0
  203. data/ext/enterprise_script_service/msgpack/test/msgpack_x3_parse.cpp +4 -0
  204. data/ext/enterprise_script_service/msgpack/test/object.cpp +4 -1
  205. data/ext/enterprise_script_service/msgpack/test/object_with_zone.cpp +12 -8
  206. data/ext/enterprise_script_service/msgpack/test/pack_unpack.cpp +30 -26
  207. data/ext/enterprise_script_service/msgpack/test/pack_unpack_c.cpp +4 -0
  208. data/ext/enterprise_script_service/msgpack/test/raw.cpp +4 -0
  209. data/ext/enterprise_script_service/msgpack/test/reference.cpp +4 -0
  210. data/ext/enterprise_script_service/msgpack/test/reference_cpp11.cpp +4 -0
  211. data/ext/enterprise_script_service/msgpack/test/reference_wrapper_cpp11.cpp +4 -0
  212. data/ext/enterprise_script_service/msgpack/test/shared_ptr_cpp11.cpp +4 -0
  213. data/ext/enterprise_script_service/msgpack/test/size_equal_only.cpp +4 -0
  214. data/ext/enterprise_script_service/msgpack/test/streaming.cpp +8 -4
  215. data/ext/enterprise_script_service/msgpack/test/streaming_c.cpp +4 -0
  216. data/ext/enterprise_script_service/msgpack/test/unique_ptr_cpp11.cpp +4 -0
  217. data/ext/enterprise_script_service/msgpack/test/user_class.cpp +16 -12
  218. data/ext/enterprise_script_service/msgpack/test/version.cpp +4 -0
  219. data/ext/enterprise_script_service/msgpack/test/visitor.cpp +4 -0
  220. data/ext/enterprise_script_service/msgpack/test/zone.cpp +4 -0
  221. data/lib/script_core/version.rb +1 -1
  222. data/script_core.gemspec +1 -1
  223. metadata +23 -9
  224. data/ext/enterprise_script_service/msgpack/.travis.yml +0 -258
@@ -1,11 +1,15 @@
1
1
  #include <msgpack.hpp>
2
2
 
3
+ #if defined(__GNUC__)
3
4
  #pragma GCC diagnostic push
4
5
  #pragma GCC diagnostic ignored "-Wconversion"
6
+ #endif //defined(__GNUC__)
5
7
 
6
8
  #include <gtest/gtest.h>
7
9
 
10
+ #if defined(__GNUC__)
8
11
  #pragma GCC diagnostic pop
12
+ #endif //defined(__GNUC__)
9
13
 
10
14
  #ifdef HAVE_CONFIG_H
11
15
  #include "config.h"
@@ -9,12 +9,16 @@
9
9
  #include <list>
10
10
  #include <limits>
11
11
 
12
+ #if defined(__GNUC__)
12
13
  #pragma GCC diagnostic push
13
14
  #pragma GCC diagnostic ignored "-Wconversion"
15
+ #endif //defined(__GNUC__)
14
16
 
15
17
  #include <gtest/gtest.h>
16
18
 
19
+ #if defined(__GNUC__)
17
20
  #pragma GCC diagnostic pop
21
+ #endif //defined(__GNUC__)
18
22
 
19
23
  #ifdef HAVE_CONFIG_H
20
24
  #include "config.h"
@@ -1,12 +1,15 @@
1
1
  #include <msgpack.hpp>
2
2
 
3
+ #if defined(__GNUC__)
3
4
  #pragma GCC diagnostic push
4
5
  #pragma GCC diagnostic ignored "-Wconversion"
6
+ #endif //defined(__GNUC__)
5
7
 
6
8
  #include <gtest/gtest.h>
7
9
 
10
+ #if defined(__GNUC__)
8
11
  #pragma GCC diagnostic pop
9
-
12
+ #endif //defined(__GNUC__)
10
13
 
11
14
  TEST(msgpack_tuple, member_get)
12
15
  {
@@ -9,12 +9,16 @@
9
9
  #include <list>
10
10
  #include <limits>
11
11
 
12
+ #if defined(__GNUC__)
12
13
  #pragma GCC diagnostic push
13
14
  #pragma GCC diagnostic ignored "-Wconversion"
15
+ #endif //defined(__GNUC__)
14
16
 
15
17
  #include <gtest/gtest.h>
16
18
 
19
+ #if defined(__GNUC__)
17
20
  #pragma GCC diagnostic pop
21
+ #endif //defined(__GNUC__)
18
22
 
19
23
  #ifdef HAVE_CONFIG_H
20
24
  #include "config.h"
@@ -4,12 +4,16 @@
4
4
  #include <limits>
5
5
  #include <cmath>
6
6
 
7
+ #if defined(__GNUC__)
7
8
  #pragma GCC diagnostic push
8
9
  #pragma GCC diagnostic ignored "-Wconversion"
10
+ #endif //defined(__GNUC__)
9
11
 
10
12
  #include <gtest/gtest.h>
11
13
 
14
+ #if defined(__GNUC__)
12
15
  #pragma GCC diagnostic pop
16
+ #endif //defined(__GNUC__)
13
17
 
14
18
  // To avoid link error
15
19
  TEST(MSGPACK_X3_PARSE, dummy)
@@ -1,12 +1,15 @@
1
1
  #include <msgpack.hpp>
2
2
 
3
+ #if defined(__GNUC__)
3
4
  #pragma GCC diagnostic push
4
5
  #pragma GCC diagnostic ignored "-Wconversion"
6
+ #endif //defined(__GNUC__)
5
7
 
6
8
  #include <gtest/gtest.h>
7
9
 
10
+ #if defined(__GNUC__)
8
11
  #pragma GCC diagnostic pop
9
-
12
+ #endif //defined(__GNUC__)
10
13
 
11
14
  enum enum_test {
12
15
  elem
@@ -1,11 +1,15 @@
1
1
  #include <msgpack.hpp>
2
2
 
3
+ #if defined(__GNUC__)
3
4
  #pragma GCC diagnostic push
4
5
  #pragma GCC diagnostic ignored "-Wconversion"
6
+ #endif //defined(__GNUC__)
5
7
 
6
8
  #include <gtest/gtest.h>
7
9
 
10
+ #if defined(__GNUC__)
8
11
  #pragma GCC diagnostic pop
12
+ #endif //defined(__GNUC__)
9
13
 
10
14
  #include <cmath>
11
15
 
@@ -769,14 +773,14 @@ TEST(object_with_zone, user_defined_non_virtual)
769
773
 
770
774
  msgpack::zone z;
771
775
  msgpack::object obj(b, z);
772
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
776
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
773
777
  #pragma GCC diagnostic push
774
778
  #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
775
- #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
779
+ #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
776
780
  bottom br = obj.as<bottom>();
777
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
781
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
778
782
  #pragma GCC diagnostic pop
779
- #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
783
+ #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
780
784
  EXPECT_EQ(b.b, br.b);
781
785
  EXPECT_EQ(b.m1, br.m1);
782
786
  EXPECT_EQ(b.m2, br.m2);
@@ -814,14 +818,14 @@ TEST(object_with_zone, user_defined_virtual)
814
818
 
815
819
  msgpack::zone z;
816
820
  msgpack::object obj(b, z);
817
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
821
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
818
822
  #pragma GCC diagnostic push
819
823
  #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
820
- #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
824
+ #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
821
825
  v_bottom br = obj.as<v_bottom>();
822
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
826
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
823
827
  #pragma GCC diagnostic pop
824
- #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
828
+ #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
825
829
  EXPECT_EQ(b.b, br.b);
826
830
  EXPECT_EQ(b.m1, br.m1);
827
831
  EXPECT_EQ(b.m2, br.m2);
@@ -1,11 +1,15 @@
1
1
  #include <msgpack.hpp>
2
2
 
3
+ #if defined(__GNUC__)
3
4
  #pragma GCC diagnostic push
4
5
  #pragma GCC diagnostic ignored "-Wconversion"
6
+ #endif //defined(__GNUC__)
5
7
 
6
8
  #include <gtest/gtest.h>
7
9
 
10
+ #if defined(__GNUC__)
8
11
  #pragma GCC diagnostic pop
12
+ #endif //defined(__GNUC__)
9
13
 
10
14
  #include <sstream>
11
15
 
@@ -163,14 +167,14 @@ TEST(unpack, int_pointer_off_no_ref)
163
167
  std::size_t off = 0;
164
168
 
165
169
  // obsolete
166
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
170
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
167
171
  #pragma GCC diagnostic push
168
172
  #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
169
- #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
173
+ #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
170
174
  msgpack::unpack(&oh, sbuf.data(), sbuf.size(), &off);
171
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
175
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
172
176
  #pragma GCC diagnostic pop
173
- #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
177
+ #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
174
178
  EXPECT_EQ(1, oh.get().as<int>());
175
179
  EXPECT_EQ(off, sbuf.size());
176
180
  }
@@ -184,14 +188,14 @@ TEST(unpack, int_pointer_off_no_ref_explicit)
184
188
  std::size_t off = 0;
185
189
 
186
190
  // obsolete
187
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
191
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
188
192
  #pragma GCC diagnostic push
189
193
  #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
190
- #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
194
+ #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
191
195
  msgpack::unpack(&oh, sbuf.data(), sbuf.size(), &off, MSGPACK_NULLPTR);
192
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
196
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
193
197
  #pragma GCC diagnostic pop
194
- #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
198
+ #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
195
199
  EXPECT_EQ(1, oh.get().as<int>());
196
200
  EXPECT_EQ(off, sbuf.size());
197
201
  }
@@ -204,14 +208,14 @@ TEST(unpack, int_pointer_no_off_ref)
204
208
  bool referenced;
205
209
 
206
210
  // obsolete
207
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
211
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
208
212
  #pragma GCC diagnostic push
209
213
  #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
210
- #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
214
+ #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
211
215
  msgpack::unpack(&oh, sbuf.data(), sbuf.size(), MSGPACK_NULLPTR, &referenced);
212
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
216
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
213
217
  #pragma GCC diagnostic pop
214
- #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
218
+ #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
215
219
  EXPECT_EQ(1, oh.get().as<int>());
216
220
  EXPECT_FALSE(referenced);
217
221
  }
@@ -225,14 +229,14 @@ TEST(unpack, int_pointer_off_ref)
225
229
  std::size_t off = 0;
226
230
 
227
231
  // obsolete
228
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
232
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
229
233
  #pragma GCC diagnostic push
230
234
  #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
231
- #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
235
+ #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
232
236
  msgpack::unpack(&oh, sbuf.data(), sbuf.size(), &off, &referenced);
233
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
237
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
234
238
  #pragma GCC diagnostic pop
235
- #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
239
+ #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
236
240
  EXPECT_EQ(1, oh.get().as<int>());
237
241
  EXPECT_EQ(off, sbuf.size());
238
242
  EXPECT_FALSE(referenced);
@@ -246,14 +250,14 @@ TEST(unpack, int_default_null_pointer)
246
250
  msgpack::object_handle oh;
247
251
 
248
252
  // obsolete
249
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
253
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
250
254
  #pragma GCC diagnostic push
251
255
  #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
252
- #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
256
+ #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
253
257
  msgpack::unpack(&oh, sbuf.data(), sbuf.size());
254
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
258
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
255
259
  #pragma GCC diagnostic pop
256
- #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
260
+ #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
257
261
  EXPECT_EQ(1, oh.get().as<int>());
258
262
  }
259
263
 
@@ -524,7 +528,7 @@ TEST(unpack, int_off_larger_than_length)
524
528
  TEST(unpack, empty_array_fix)
525
529
  {
526
530
  std::string buf;
527
- buf.push_back(static_cast<char>(0x90));
531
+ buf.push_back(static_cast<char>(0x90u));
528
532
  std::size_t off = 0;
529
533
 
530
534
  msgpack::object_handle oh = msgpack::unpack(buf.data(), buf.size(), off);
@@ -536,7 +540,7 @@ TEST(unpack, empty_array_fix)
536
540
  TEST(unpack, empty_array_16)
537
541
  {
538
542
  std::string buf;
539
- buf.push_back(static_cast<char>(0xdc));
543
+ buf.push_back(static_cast<char>(0xdcu));
540
544
  buf.push_back(static_cast<char>(0x00));
541
545
  buf.push_back(static_cast<char>(0x00));
542
546
  std::size_t off = 0;
@@ -550,7 +554,7 @@ TEST(unpack, empty_array_16)
550
554
  TEST(unpack, empty_array_32)
551
555
  {
552
556
  std::string buf;
553
- buf.push_back(static_cast<char>(0xdd));
557
+ buf.push_back(static_cast<char>(0xddu));
554
558
  buf.push_back(static_cast<char>(0x00));
555
559
  buf.push_back(static_cast<char>(0x00));
556
560
  buf.push_back(static_cast<char>(0x00));
@@ -566,7 +570,7 @@ TEST(unpack, empty_array_32)
566
570
  TEST(unpack, empty_map_fix)
567
571
  {
568
572
  std::string buf;
569
- buf.push_back(static_cast<char>(0x80));
573
+ buf.push_back(static_cast<char>(0x80u));
570
574
  std::size_t off = 0;
571
575
 
572
576
  msgpack::object_handle oh = msgpack::unpack(buf.data(), buf.size(), off);
@@ -578,7 +582,7 @@ TEST(unpack, empty_map_fix)
578
582
  TEST(unpack, empty_map_16)
579
583
  {
580
584
  std::string buf;
581
- buf.push_back(static_cast<char>(0xde));
585
+ buf.push_back(static_cast<char>(0xdeu));
582
586
  buf.push_back(static_cast<char>(0x00));
583
587
  buf.push_back(static_cast<char>(0x00));
584
588
  std::size_t off = 0;
@@ -592,7 +596,7 @@ TEST(unpack, empty_map_16)
592
596
  TEST(unpack, empty_map_32)
593
597
  {
594
598
  std::string buf;
595
- buf.push_back(static_cast<char>(0xdf));
599
+ buf.push_back(static_cast<char>(0xdfu));
596
600
  buf.push_back(static_cast<char>(0x00));
597
601
  buf.push_back(static_cast<char>(0x00));
598
602
  buf.push_back(static_cast<char>(0x00));
@@ -1,11 +1,15 @@
1
1
  #include <msgpack.h>
2
2
 
3
+ #if defined(__GNUC__)
3
4
  #pragma GCC diagnostic push
4
5
  #pragma GCC diagnostic ignored "-Wconversion"
6
+ #endif //defined(__GNUC__)
5
7
 
6
8
  #include <gtest/gtest.h>
7
9
 
10
+ #if defined(__GNUC__)
8
11
  #pragma GCC diagnostic pop
12
+ #endif //defined(__GNUC__)
9
13
 
10
14
  #include <stdio.h>
11
15
 
@@ -3,12 +3,16 @@
3
3
  #include <string>
4
4
  #include <sstream>
5
5
 
6
+ #if defined(__GNUC__)
6
7
  #pragma GCC diagnostic push
7
8
  #pragma GCC diagnostic ignored "-Wconversion"
9
+ #endif //defined(__GNUC__)
8
10
 
9
11
  #include <gtest/gtest.h>
10
12
 
13
+ #if defined(__GNUC__)
11
14
  #pragma GCC diagnostic pop
15
+ #endif //defined(__GNUC__)
12
16
 
13
17
  #ifdef HAVE_CONFIG_H
14
18
  #include "config.h"
@@ -1,11 +1,15 @@
1
1
  #include <msgpack.hpp>
2
2
 
3
+ #if defined(__GNUC__)
3
4
  #pragma GCC diagnostic push
4
5
  #pragma GCC diagnostic ignored "-Wconversion"
6
+ #endif //defined(__GNUC__)
5
7
 
6
8
  #include <gtest/gtest.h>
7
9
 
10
+ #if defined(__GNUC__)
8
11
  #pragma GCC diagnostic pop
12
+ #endif //defined(__GNUC__)
9
13
 
10
14
  TEST(reference, unpack_int)
11
15
  {
@@ -1,11 +1,15 @@
1
1
  #include <msgpack.hpp>
2
2
 
3
+ #if defined(__GNUC__)
3
4
  #pragma GCC diagnostic push
4
5
  #pragma GCC diagnostic ignored "-Wconversion"
6
+ #endif //defined(__GNUC__)
5
7
 
6
8
  #include <gtest/gtest.h>
7
9
 
10
+ #if defined(__GNUC__)
8
11
  #pragma GCC diagnostic pop
12
+ #endif //defined(__GNUC__)
9
13
 
10
14
  #if !defined(MSGPACK_USE_CPP03)
11
15
 
@@ -1,12 +1,16 @@
1
1
  #include <msgpack.hpp>
2
2
  #include <sstream>
3
3
 
4
+ #if defined(__GNUC__)
4
5
  #pragma GCC diagnostic push
5
6
  #pragma GCC diagnostic ignored "-Wconversion"
7
+ #endif //defined(__GNUC__)
6
8
 
7
9
  #include <gtest/gtest.h>
8
10
 
11
+ #if defined(__GNUC__)
9
12
  #pragma GCC diagnostic pop
13
+ #endif //defined(__GNUC__)
10
14
 
11
15
  #ifdef HAVE_CONFIG_H
12
16
  #include "config.h"
@@ -2,12 +2,16 @@
2
2
  #include <sstream>
3
3
  #include <iterator>
4
4
 
5
+ #if defined(__GNUC__)
5
6
  #pragma GCC diagnostic push
6
7
  #pragma GCC diagnostic ignored "-Wconversion"
8
+ #endif //defined(__GNUC__)
7
9
 
8
10
  #include <gtest/gtest.h>
9
11
 
12
+ #if defined(__GNUC__)
10
13
  #pragma GCC diagnostic pop
14
+ #endif //defined(__GNUC__)
11
15
 
12
16
  #ifdef HAVE_CONFIG_H
13
17
  #include "config.h"
@@ -1,12 +1,16 @@
1
1
  #include <sstream>
2
2
  #include <msgpack.hpp>
3
3
 
4
+ #if defined(__GNUC__)
4
5
  #pragma GCC diagnostic push
5
6
  #pragma GCC diagnostic ignored "-Wconversion"
7
+ #endif //defined(__GNUC__)
6
8
 
7
9
  #include <gtest/gtest.h>
8
10
 
11
+ #if defined(__GNUC__)
9
12
  #pragma GCC diagnostic pop
13
+ #endif //defined(__GNUC__)
10
14
 
11
15
  TEST(size_equal_only, array)
12
16
  {
@@ -1,11 +1,15 @@
1
1
  #include <msgpack.hpp>
2
2
 
3
+ #if defined(__GNUC__)
3
4
  #pragma GCC diagnostic push
4
5
  #pragma GCC diagnostic ignored "-Wconversion"
6
+ #endif //defined(__GNUC__)
5
7
 
6
8
  #include <gtest/gtest.h>
7
9
 
10
+ #if defined(__GNUC__)
8
11
  #pragma GCC diagnostic pop
12
+ #endif //defined(__GNUC__)
9
13
 
10
14
  #include <sstream>
11
15
 
@@ -85,14 +89,14 @@ TEST(streaming, basic_pointer)
85
89
 
86
90
  pac.buffer_consumed(len);
87
91
 
88
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
92
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
89
93
  #pragma GCC diagnostic push
90
94
  #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
91
- #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
95
+ #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
92
96
  while(pac.next(&oh)) {
93
- #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
97
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
94
98
  #pragma GCC diagnostic pop
95
- #endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
99
+ #endif // defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
96
100
  msgpack::object obj = oh.get();
97
101
  switch(count++) {
98
102
  case 0: