mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-15 23:20:08 +02:00
Suppressed 'maybe uninitialized' warnings on g++.
This commit is contained in:
@@ -80,7 +80,14 @@ struct object_with_zone<std::vector<T> > {
|
||||
o.via.array.size = size;
|
||||
typename std::vector<T>::const_iterator it(v.begin());
|
||||
do {
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif // defined(__GNUC__) && !defined(__clang__)
|
||||
*p = msgpack::object(*it, o.zone);
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif // defined(__GNUC__) && !defined(__clang__)
|
||||
++p;
|
||||
++it;
|
||||
} while(p < pend);
|
||||
|
Reference in New Issue
Block a user