You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2013/12/12 17:15:36 UTC

svn commit: r1550446 - in /qpid/branches/0.26/qpid/cpp/src/qpid/linearstore/jrnl: deq_rec.cpp enq_rec.cpp txn_rec.cpp

Author: kpvdr
Date: Thu Dec 12 16:15:36 2013
New Revision: 1550446

URL: http://svn.apache.org/r1550446
Log:
QPID-5401 Linearstore: ARM compile error: cast ... increases required alignment of target type

Modified:
    qpid/branches/0.26/qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.cpp
    qpid/branches/0.26/qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.cpp
    qpid/branches/0.26/qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.cpp

Modified: qpid/branches/0.26/qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/0.26/qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.cpp?rev=1550446&r1=1550445&r2=1550446&view=diff
==============================================================================
--- qpid/branches/0.26/qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.cpp (original)
+++ qpid/branches/0.26/qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.cpp Thu Dec 12 16:15:36 2013
@@ -280,9 +280,9 @@ deq_rec::decode(rec_hdr_t& h, void* rptr
         //_deq_hdr.hdr_copy(h);
         ::rec_hdr_copy(&_deq_hdr._rhdr, &h);
         rd_cnt = sizeof(rec_hdr_t);
-        _deq_hdr._deq_rid = *(uint64_t*)((char*)rptr + rd_cnt);
+        std::memcpy(&_deq_hdr._deq_rid, (char*)rptr + rd_cnt, sizeof(u_int64_t));
         rd_cnt += sizeof(uint64_t);
-        _deq_hdr._xidsize = *(std::size_t*)((char*)rptr + rd_cnt);
+        std::memcpy(&_deq_hdr._xidsize, (char*)rptr + rd_cnt, sizeof(std::size_t));
         rd_cnt = sizeof(deq_hdr_t);
         chk_hdr();
         if (_deq_hdr._xidsize)

Modified: qpid/branches/0.26/qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/0.26/qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.cpp?rev=1550446&r1=1550445&r2=1550446&view=diff
==============================================================================
--- qpid/branches/0.26/qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.cpp (original)
+++ qpid/branches/0.26/qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.cpp Thu Dec 12 16:15:36 2013
@@ -352,12 +352,12 @@ enq_rec::decode(rec_hdr_t& h, void* rptr
         //_enq_hdr.hdr_copy(h);
         ::rec_hdr_copy(&_enq_hdr._rhdr, &h);
         rd_cnt = sizeof(rec_hdr_t);
-        _enq_hdr._xidsize = *(std::size_t*)((char*)rptr + rd_cnt);
+        std::memcpy(&_enq_hdr._xidsize, (char*)rptr + rd_cnt, sizeof(std::size_t));
         rd_cnt += sizeof(std::size_t);
 #if defined(JRNL_32_BIT)
         rd_cnt += sizeof(uint32_t); // Filler 0
 #endif
-        _enq_hdr._dsize = *(std::size_t*)((char*)rptr + rd_cnt);
+        std::memcpy(&_enq_hdr._dsize, (char*)rptr + rd_cnt, sizeof(std::size_t));
         rd_cnt = sizeof(enq_hdr_t);
         chk_hdr();
         if (_enq_hdr._xidsize + (::is_enq_external(&_enq_hdr) ? 0 : _enq_hdr._dsize))

Modified: qpid/branches/0.26/qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/0.26/qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.cpp?rev=1550446&r1=1550445&r2=1550446&view=diff
==============================================================================
--- qpid/branches/0.26/qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.cpp (original)
+++ qpid/branches/0.26/qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.cpp Thu Dec 12 16:15:36 2013
@@ -263,7 +263,7 @@ txn_rec::decode(rec_hdr_t& h, void* rptr
 #if defined(JRNL_BIG_ENDIAN) && defined(JRNL_32_BIT)
         rd_cnt += sizeof(uint32_t); // Filler 0
 #endif
-        _txn_hdr._xidsize = *(std::size_t*)((char*)rptr + rd_cnt);
+        std::memcpy(&_txn_hdr._xidsize, (char*)rptr + rd_cnt, sizeof(std::size_t));
         rd_cnt = sizeof(txn_hdr_t);
         chk_hdr();
         _buff = std::malloc(_txn_hdr._xidsize);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org