Skip to content

Commit a356db1

Browse files
author
Deepika
committed
Resolved warning: variable declared but never referenced
1 parent 7b5fe2d commit a356db1

File tree

1 file changed

+5
-4
lines changed
  • components/storage/blockdevice/COMPONENT_FLASHIAP/TESTS/filesystem/fopen

1 file changed

+5
-4
lines changed

components/storage/blockdevice/COMPONENT_FLASHIAP/TESTS/filesystem/fopen/fopen.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,6 @@ control_t fslittle_fopen_test_06(const size_t call_count)
734734
control_t fslittle_fopen_test_07(const size_t call_count)
735735
{
736736
FILE *f = NULL;
737-
int ret = -1;
738737
int errno_val = 0;
739738
const char *filename = sd_badfile_path;
740739

@@ -1016,7 +1015,7 @@ control_t fslittle_fopen_test_11(const size_t call_count)
10161015
return CaseNext;
10171016
}
10181017

1019-
1018+
#if ! defined(__ARMCC_VERSION) && defined(__GNUC__)
10201019
/* file data for test_12 */
10211020
static fslittle_kv_data_t fslittle_fopen_test_12_kv_data[] = {
10221021
{ "/sd/test_12/subdir/testfil1.txt", "testfil1.txt"},
@@ -1026,6 +1025,7 @@ static fslittle_kv_data_t fslittle_fopen_test_12_kv_data[] = {
10261025
{ "/sd/test_12/testfil5.txt", "testfil5.txt"},
10271026
{ NULL, NULL},
10281027
};
1028+
#endif
10291029

10301030
/** @brief test for operation of readdir().
10311031
*
@@ -1036,6 +1036,7 @@ static fslittle_kv_data_t fslittle_fopen_test_12_kv_data[] = {
10361036
*/
10371037
control_t fslittle_fopen_test_12(const size_t call_count)
10381038
{
1039+
#if ! defined(__ARMCC_VERSION) && defined(__GNUC__)
10391040
char buf[FSLITTLE_FOPEN_TEST_WORK_BUF_SIZE_1];
10401041
char *pos = NULL;
10411042
int32_t count = 0;
@@ -1048,8 +1049,6 @@ control_t fslittle_fopen_test_12(const size_t call_count)
10481049
FSLITTLE_FENTRYLOG("%s:entered\n", __func__);
10491050
(void) call_count;
10501051

1051-
#if ! defined(__ARMCC_VERSION) && defined(__GNUC__)
1052-
10531052
/* start from a known state i.e. directory to be created in not present */
10541053
while (node->filename != NULL) {
10551054
fslittle_filepath_remove_all((char *) node->filename);
@@ -1156,13 +1155,15 @@ control_t fslittle_fopen_test_13(const size_t call_count)
11561155
return CaseNext;
11571156
}
11581157

1158+
#if ! defined(__ARMCC_VERSION) && defined(__GNUC__)
11591159
/* file data for test_14 */
11601160
static fslittle_kv_data_t fslittle_fopen_test_14_kv_data[] = {
11611161
/* a file is included in the filepath even though its not created by the test,
11621162
* as the fslittle_filepath_make_dirs() works with it present. */
11631163
{ "/sd/test_14/testfile.txt", "testdata"},
11641164
{ NULL, NULL},
11651165
};
1166+
#endif
11661167

11671168
/** @brief test for operation of stat()
11681169
*

0 commit comments

Comments
 (0)