summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/Uuid.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2012-05-24 04:14:37 +0000
committerAndrew Stitcher <astitcher@apache.org>2012-05-24 04:14:37 +0000
commit837981a3dd8f7bbea5f6e24562971e649206ab96 (patch)
treef89914592b85f46f7ec55e56438eee940f50319d /qpid/cpp/src/tests/Uuid.cpp
parent921f66e37aac6f43314d4edb07e48d0ea89a16c0 (diff)
downloadqpid-python-837981a3dd8f7bbea5f6e24562971e649206ab96.tar.gz
NO-JIRA: Remove final vestiges of non-portable alloca().
Fixed unit_test changes to avoid incorrect array initialisation. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1342135 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/Uuid.cpp')
-rw-r--r--qpid/cpp/src/tests/Uuid.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/qpid/cpp/src/tests/Uuid.cpp b/qpid/cpp/src/tests/Uuid.cpp
index d7d1f00e3c..aa9580e25e 100644
--- a/qpid/cpp/src/tests/Uuid.cpp
+++ b/qpid/cpp/src/tests/Uuid.cpp
@@ -19,7 +19,6 @@
#include "qpid/framing/Uuid.h"
#include "qpid/framing/Buffer.h"
#include "qpid/types/Uuid.h"
-#include "qpid/sys/alloca.h"
#include "unit_test.h"
@@ -97,12 +96,12 @@ QPID_AUTO_TEST_CASE(testUuidIOstream) {
}
QPID_AUTO_TEST_CASE(testUuidEncodeDecode) {
- char* buff = static_cast<char*>(::alloca(Uuid::size()));
- Buffer wbuf(buff, Uuid::size());
+ std::vector<char> buff(Uuid::size());
+ Buffer wbuf(&buff[0], Uuid::size());
Uuid uuid(sample.c_array());
uuid.encode(wbuf);
- Buffer rbuf(buff, Uuid::size());
+ Buffer rbuf(&buff[0], Uuid::size());
Uuid decoded;
decoded.decode(rbuf);
BOOST_CHECK_EQUAL(string(sample.begin(), sample.end()),