Skip to content

Commit 38b4e11

Browse files
simonqhughesadbridge
authored andcommitted
Corrections of debug trace statements which prevent compilation when CFSTORE_DEBUG is defined.
1 parent ddf1de5 commit 38b4e11

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

features/storage/FEATURE_STORAGE/TESTS/cfstore/create/create.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,11 +536,11 @@ int32_t cfstore_create_test_05_core(const size_t call_count)
536536
snprintf(kv_name_tag_buf, kv_name_tag_len+1, "%0d", (int) i);
537537
ret = cfstore_create_kv_create(kv_name_min_len, kv_name_tag_buf, value_buf, kv_value_min_len/64 * (i+1));
538538
if(ret == ARM_CFSTORE_DRIVER_ERROR_OUT_OF_MEMORY){
539-
CFSTORE_ERRLOG("Out of memory on %d-th KV, trying to allocate memory totalling %d.\n", (int) i, (int) bytes_stored);
539+
CFSTORE_ERRLOG("Out of memory on %d-th KV.\n", (int) i);
540540
break;
541541
}
542542
/* revert CFSTORE_LOG for more trace */
543-
CFSTORE_DBGLOG("Successfully stored %d-th KV bytes, totalling %d.\n", (int) i, (int) bytes_stored);
543+
CFSTORE_DBGLOG("Successfully stored %d-th KV.\n", (int) i);
544544
}
545545
ret = cfstore_test_delete_all();
546546
CFSTORE_TEST_UTEST_MESSAGE(cfstore_create_utest_msg_g, CFSTORE_UTEST_MSG_BUF_SIZE, "%s:Error: failed to delete_all() attributes to clean up after test.\n", __func__);

features/storage/FEATURE_STORAGE/cfstore/source/cfstore_debug.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include <stdint.h>
1111
#include <assert.h>
12+
#include <stdio.h>
1213

1314

1415
/* Debug Support */
@@ -27,9 +28,7 @@
2728
printf(_fmt, __VA_ARGS__); \
2829
}while(0);
2930

30-
//todo: restore #define noCFSTORE_DEBUG
3131
#define noCFSTORE_DEBUG
32-
//#define CFSTORE_DEBUG
3332
#ifdef CFSTORE_DEBUG
3433

3534
extern uint32_t cfstore_optDebug_g;

features/storage/FEATURE_STORAGE/cfstore/source/cfstore_svm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ StorageVolumeManager volumeManager;
4747
/* used only for the initialization of the volume-manager. */
4848
static void cfstore_svm_volume_manager_initialize_callback(int32_t status)
4949
{
50-
CFSTORE_FENTRYLOG("%s: operation %d with status %d" , __func__, (int) operation, (int) status);
50+
CFSTORE_FENTRYLOG("%s: with status %d" , __func__, (int) status);
5151
}
5252

5353
static void cfstore_svm_journal_mtc_callback(int32_t status, ARM_STORAGE_OPERATION operation)

features/storage/FEATURE_STORAGE/cfstore/source/configuration_store.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,8 @@
4646

4747
#ifdef CFSTORE_DEBUG
4848
uint32_t cfstore_optDebug_g = 1;
49-
//todo: restore uint32_t cfstore_optLogLevel_g = CFSTORE_LOG_NONE; /*CFSTORE_LOG_NONE|CFSTORE_LOG_ERR|CFSTORE_LOG_DEBUG|CFSTORE_LOG_FENTRY */
50-
//uint32_t cfstore_optLogTracepoint_g = CFSTORE_TP_NONE; /*CFSTORE_TP_NONE|CFSTORE_TP_CLOSE|CFSTORE_TP_CREATE|CFSTORE_TP_DELETE|CFSTORE_TP_FILE|CFSTORE_TP_FIND|CFSTORE_TP_FLUSH|CFSTORE_TP_INIT|CFSTORE_TP_OPEN|CFSTORE_TP_READ|CFSTORE_TP_WRITE|CFSTORE_TP_VERBOSE1|CFSTORE_TP_VERBOSE2|CFSTORE_TP_VERBOSE3|CFSTORE_TP_FENTRY; */
51-
uint32_t cfstore_optLogLevel_g = CFSTORE_LOG_NONE|CFSTORE_LOG_ERR|CFSTORE_LOG_DEBUG|CFSTORE_LOG_FENTRY;
52-
uint32_t cfstore_optLogTracepoint_g = CFSTORE_TP_NONE|CFSTORE_TP_CLOSE|CFSTORE_TP_CREATE|CFSTORE_TP_DELETE|CFSTORE_TP_FILE|CFSTORE_TP_FIND|CFSTORE_TP_FLUSH|CFSTORE_TP_INIT|CFSTORE_TP_OPEN|CFSTORE_TP_READ|CFSTORE_TP_WRITE|CFSTORE_TP_VERBOSE1|CFSTORE_TP_VERBOSE2|CFSTORE_TP_VERBOSE3|CFSTORE_TP_FENTRY;
49+
uint32_t cfstore_optLogLevel_g = CFSTORE_LOG_NONE; /*CFSTORE_LOG_NONE|CFSTORE_LOG_ERR|CFSTORE_LOG_DEBUG|CFSTORE_LOG_FENTRY */
50+
uint32_t cfstore_optLogTracepoint_g = CFSTORE_TP_NONE; /*CFSTORE_TP_NONE|CFSTORE_TP_CLOSE|CFSTORE_TP_CREATE|CFSTORE_TP_DELETE|CFSTORE_TP_FILE|CFSTORE_TP_FIND|CFSTORE_TP_FLUSH|CFSTORE_TP_INIT|CFSTORE_TP_OPEN|CFSTORE_TP_READ|CFSTORE_TP_WRITE|CFSTORE_TP_VERBOSE1|CFSTORE_TP_VERBOSE2|CFSTORE_TP_VERBOSE3|CFSTORE_TP_FENTRY; */
5351
#endif
5452

5553

0 commit comments

Comments
 (0)