mirror of https://github.com/ARMmbed/mbed-os.git
Fix Compilation problems
parent
5256e963f0
commit
5f7a6401b8
|
@ -64,6 +64,8 @@
|
|||
#define MSG_TRNG_TEST_STEP2 "check_step2"
|
||||
#define MSG_TRNG_TEST_SUITE_ENDED "Test_suite_ended"
|
||||
|
||||
#define RESULT_SUCCESS 0
|
||||
|
||||
#define NVKEY 1 //NVstore key for storing and loading data
|
||||
|
||||
/*there are some issues with nvstore and greentea reset, so for now nvstore is disabled,
|
||||
|
@ -114,7 +116,7 @@ static void compress_and_compare(char *key, char *value)
|
|||
#if NVSTORE_RESET
|
||||
uint16_t actual = 0;
|
||||
result = nvstore.get(NVKEY, sizeof(buffer), buffer, actual);
|
||||
TEST_ASSERT_EQUAL(NVSTORE_SUCCESS, result);
|
||||
TEST_ASSERT_EQUAL(RESULT_SUCCESS, result);
|
||||
#else
|
||||
/*Using base64 to decode data sent from host*/
|
||||
uint32_t lengthWritten = 0;
|
||||
|
@ -173,11 +175,11 @@ static void compress_and_compare(char *key, char *value)
|
|||
int result = 0;
|
||||
#if NVSTORE_RESET
|
||||
result = nvstore.set(NVKEY, sizeof(buffer), buffer);
|
||||
TEST_ASSERT_EQUAL(NVSTORE_SUCCESS, result);
|
||||
TEST_ASSERT_EQUAL(RESULT_SUCCESS, result);
|
||||
#else
|
||||
/*Using base64 to encode data sending from host*/
|
||||
result = trng_EncodeBase64(buffer, BUFFER_LEN, (char *)out_comp_buf, sizeof(out_comp_buf));
|
||||
TEST_ASSERT_EQUAL(NVSTORE_SUCCESS, result);
|
||||
TEST_ASSERT_EQUAL(RESULT_SUCCESS, result);
|
||||
greentea_send_kv(MSG_TRNG_BUFFER, (const char *)out_comp_buf);
|
||||
#endif
|
||||
system_reset();
|
||||
|
|
|
@ -585,7 +585,7 @@ size_t pithy_Compress(const char *uncompressed,
|
|||
do {
|
||||
if (compressionLevel > 2) {
|
||||
DCHECK((uncompressedPtr + 5ul) <= uncompressedEnd);
|
||||
uncompressedBytes64 = pithy_Load64(uncompressedPtr + 1ul);
|
||||
uncompressedBytes64 = pithy_Load64((uint64_t*)uncompressedPtr + 1ul);
|
||||
hashTable[pithy_HashBytes(pithy_GetUint32AtOffset(uncompressedBytes64, 0u), shift)] =
|
||||
uncompressedPtr + 1ul;
|
||||
if (compressionLevel > 4) {
|
||||
|
@ -618,7 +618,7 @@ size_t pithy_Compress(const char *uncompressed,
|
|||
|
||||
DCHECK(((uncompressedPtr - 3ul) >= uncompressed) && (uncompressedPtr <= uncompressedEnd));
|
||||
|
||||
uncompressedBytes64 = pithy_Load64(uncompressedPtr - 3ul);
|
||||
uncompressedBytes64 = pithy_Load64((uint64_t*)uncompressedPtr - 3ul);
|
||||
|
||||
if (compressionLevel > 0) {
|
||||
if (compressionLevel > 8) {
|
||||
|
|
Loading…
Reference in New Issue