diff --git a/features/storage/FEATURE_STORAGE/TESTS/cfstore/example1/example1.cpp b/features/storage/FEATURE_STORAGE/TESTS/cfstore/example1/example1.cpp index 6bab0ab509..6b017b3fcc 100644 --- a/features/storage/FEATURE_STORAGE/TESTS/cfstore/example1/example1.cpp +++ b/features/storage/FEATURE_STORAGE/TESTS/cfstore/example1/example1.cpp @@ -273,7 +273,7 @@ static int32_t cfstore_test_startup(void) #ifdef CFSTORE_CONFIG_BACKEND_FLASH_ENABLED int32_t ret = ARM_DRIVER_ERROR; - FlashJournal_t jrnl; + static FlashJournal_t jrnl; extern ARM_DRIVER_STORAGE ARM_Driver_Storage_(0); const ARM_DRIVER_STORAGE *drv = &ARM_Driver_Storage_(0); diff --git a/features/storage/FEATURE_STORAGE/TESTS/cfstore/example5/example5.cpp b/features/storage/FEATURE_STORAGE/TESTS/cfstore/example5/example5.cpp index fd6e2d4a7b..926c1eceb3 100644 --- a/features/storage/FEATURE_STORAGE/TESTS/cfstore/example5/example5.cpp +++ b/features/storage/FEATURE_STORAGE/TESTS/cfstore/example5/example5.cpp @@ -166,7 +166,7 @@ int32_t cfstore_test_startup(void) #ifdef CFSTORE_CONFIG_BACKEND_FLASH_ENABLED int32_t ret = ARM_DRIVER_ERROR; - FlashJournal_t jrnl; + static FlashJournal_t jrnl; extern ARM_DRIVER_STORAGE ARM_Driver_Storage_(0); const ARM_DRIVER_STORAGE *drv = &ARM_Driver_Storage_(0); diff --git a/features/storage/FEATURE_STORAGE/cfstore/source/cfstore_test.c b/features/storage/FEATURE_STORAGE/cfstore/source/cfstore_test.c index ed7311a4d2..700e4e4b25 100644 --- a/features/storage/FEATURE_STORAGE/cfstore/source/cfstore_test.c +++ b/features/storage/FEATURE_STORAGE/cfstore/source/cfstore_test.c @@ -256,7 +256,7 @@ int32_t cfstore_test_startup(void) #ifdef CFSTORE_CONFIG_BACKEND_FLASH_ENABLED - FlashJournal_t jrnl; + static FlashJournal_t jrnl; extern ARM_DRIVER_STORAGE ARM_Driver_Storage_(0); const ARM_DRIVER_STORAGE *drv = &ARM_Driver_Storage_(0);