Skip to content

Commit e07d774

Browse files
authored
Merge pull request #784 from redboltz/more_warning_fix
Fixed warnings.
2 parents 7cdc5b8 + de99222 commit e07d774

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

test/iterator_cpp11.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ TEST(iterator, vector)
2727
vec_type vec;
2828
vec.reserve(VECTOR_SIZE);
2929
for (unsigned int i = 0; i < VECTOR_SIZE; i++) {
30-
vec.push_back(rand());
30+
vec.push_back(static_cast<unsigned int>(rand()));
3131
}
3232
msgpack::sbuffer sbuf;
3333
msgpack::pack(sbuf, vec);
@@ -53,7 +53,7 @@ TEST(iterator, map)
5353
using map_type = map<unsigned int, unsigned int>;
5454
map_type map;
5555
for (unsigned int i = 0; i < MAP_SIZE; i++) {
56-
map[rand()] = rand();
56+
map[static_cast<unsigned int>(rand())] = static_cast<unsigned int>(rand());
5757
}
5858
msgpack::sbuffer sbuf;
5959
msgpack::pack(sbuf, map);

test/size_equal_only.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,13 @@ TEST(size_equal_only, tuple)
192192
}
193193

194194
struct foo1 {
195-
foo1() = default;
196195
foo1(int i, bool b):t(i, b), seo(t) {}
197196
std::tuple<int, bool> t;
198197
msgpack::type::size_equal_only<std::tuple<int, bool> > seo;
199198
MSGPACK_DEFINE(seo);
200199
};
201200

202201
struct foo2 {
203-
foo2() = default;
204202
foo2(int i, bool b, std::string const& s):t(i, b, s), seo(t) {}
205203
std::tuple<int, bool, std::string> t;
206204
msgpack::type::size_equal_only<std::tuple<int, bool, std::string> > seo;

0 commit comments

Comments
 (0)