A reference to h->seq passed to std::pair ostensibly could not bind
because the header structure is packed. At first this looked like
a more general unaligned access problem, but the only location the
compiler rejects is a false positive.
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
(cherry picked from commit
c930a1f119069a424af28a618b0abff4947c221f)
// ok!
if (seq)
*seq = h->seq;
- journalq.push_back(pair<uint64_t,off64_t>(h->seq, pos));
+
+ // works around an apparent GCC 4.8(?) compiler bug about unaligned
+ // bind by reference to (packed) h->seq
+ journalq.push_back(
+ pair<uint64_t,off64_t>(static_cast<uint64_t>(h->seq),
+ static_cast<off64_t>(pos)));
if (next_pos)
*next_pos = pos;