mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #9187 from deepikabhavnani/iar8_build_failures
Resolves build failures with IAR 8.xpull/9225/head
commit
51b8d6e59d
|
@ -75,7 +75,7 @@ LittleFileSystem fs("sd");
|
|||
|
||||
static char fslittle_fopen_utest_msg_g[FSLITTLE_UTEST_MSG_BUF_SIZE];
|
||||
#define FSLITTLE_FOPEN_TEST_MOUNT_PT_NAME "sd"
|
||||
#define FSLITTLE_FOPEN_TEST_MOUNT_PT_PATH "/"FSLITTLE_FOPEN_TEST_MOUNT_PT_NAME
|
||||
#define FSLITTLE_FOPEN_TEST_MOUNT_PT_PATH "/" FSLITTLE_FOPEN_TEST_MOUNT_PT_NAME
|
||||
#define FSLITTLE_FOPEN_TEST_WORK_BUF_SIZE_1 64
|
||||
#define FSLITTLE_FOPEN_TEST_FILEPATH_MAX_DEPTH 20
|
||||
static const int MAX_TEST_SIZE = 256 * 1024 * 2;
|
||||
|
@ -734,7 +734,6 @@ control_t fslittle_fopen_test_06(const size_t call_count)
|
|||
control_t fslittle_fopen_test_07(const size_t call_count)
|
||||
{
|
||||
FILE *f = NULL;
|
||||
int ret = -1;
|
||||
int errno_val = 0;
|
||||
const char *filename = sd_badfile_path;
|
||||
|
||||
|
@ -1016,7 +1015,7 @@ control_t fslittle_fopen_test_11(const size_t call_count)
|
|||
return CaseNext;
|
||||
}
|
||||
|
||||
|
||||
#if ! defined(__ARMCC_VERSION) && defined(__GNUC__)
|
||||
/* file data for test_12 */
|
||||
static fslittle_kv_data_t fslittle_fopen_test_12_kv_data[] = {
|
||||
{ "/sd/test_12/subdir/testfil1.txt", "testfil1.txt"},
|
||||
|
@ -1026,6 +1025,7 @@ static fslittle_kv_data_t fslittle_fopen_test_12_kv_data[] = {
|
|||
{ "/sd/test_12/testfil5.txt", "testfil5.txt"},
|
||||
{ NULL, NULL},
|
||||
};
|
||||
#endif
|
||||
|
||||
/** @brief test for operation of readdir().
|
||||
*
|
||||
|
@ -1036,6 +1036,7 @@ static fslittle_kv_data_t fslittle_fopen_test_12_kv_data[] = {
|
|||
*/
|
||||
control_t fslittle_fopen_test_12(const size_t call_count)
|
||||
{
|
||||
#if ! defined(__ARMCC_VERSION) && defined(__GNUC__)
|
||||
char buf[FSLITTLE_FOPEN_TEST_WORK_BUF_SIZE_1];
|
||||
char *pos = NULL;
|
||||
int32_t count = 0;
|
||||
|
@ -1048,8 +1049,6 @@ control_t fslittle_fopen_test_12(const size_t call_count)
|
|||
FSLITTLE_FENTRYLOG("%s:entered\n", __func__);
|
||||
(void) call_count;
|
||||
|
||||
#if ! defined(__ARMCC_VERSION) && defined(__GNUC__)
|
||||
|
||||
/* start from a known state i.e. directory to be created in not present */
|
||||
while (node->filename != NULL) {
|
||||
fslittle_filepath_remove_all((char *) node->filename);
|
||||
|
@ -1156,6 +1155,7 @@ control_t fslittle_fopen_test_13(const size_t call_count)
|
|||
return CaseNext;
|
||||
}
|
||||
|
||||
#if ! defined(__ARMCC_VERSION) && defined(__GNUC__)
|
||||
/* file data for test_14 */
|
||||
static fslittle_kv_data_t fslittle_fopen_test_14_kv_data[] = {
|
||||
/* a file is included in the filepath even though its not created by the test,
|
||||
|
@ -1163,6 +1163,7 @@ static fslittle_kv_data_t fslittle_fopen_test_14_kv_data[] = {
|
|||
{ "/sd/test_14/testfile.txt", "testdata"},
|
||||
{ NULL, NULL},
|
||||
};
|
||||
#endif
|
||||
|
||||
/** @brief test for operation of stat()
|
||||
*
|
||||
|
|
|
@ -75,7 +75,6 @@ DIR *dd[MBED_TEST_DIRS];
|
|||
FILE *fd[MBED_TEST_FILES];
|
||||
struct dirent ent;
|
||||
struct dirent *ed;
|
||||
size_t size;
|
||||
uint8_t buffer[MBED_TEST_BUFFER];
|
||||
uint8_t rbuffer[MBED_TEST_BUFFER];
|
||||
uint8_t wbuffer[MBED_TEST_BUFFER];
|
||||
|
@ -107,6 +106,7 @@ void test_simple_file_test()
|
|||
TEST_ASSERT_EQUAL(0, res);
|
||||
|
||||
{
|
||||
size_t size;
|
||||
res = fs.mount(&bd);
|
||||
TEST_ASSERT_EQUAL(0, res);
|
||||
res = file[0].open(&fs, "hello", O_WRONLY | O_CREAT);
|
||||
|
|
|
@ -75,7 +75,6 @@ DIR *dd[MBED_TEST_DIRS];
|
|||
FILE *fd[MBED_TEST_FILES];
|
||||
struct dirent ent;
|
||||
struct dirent *ed;
|
||||
size_t size;
|
||||
uint8_t buffer[MBED_TEST_BUFFER];
|
||||
uint8_t rbuffer[MBED_TEST_BUFFER];
|
||||
uint8_t wbuffer[MBED_TEST_BUFFER];
|
||||
|
@ -89,6 +88,7 @@ void test_seek_tests()
|
|||
TEST_ASSERT_EQUAL(0, res);
|
||||
|
||||
{
|
||||
size_t size;
|
||||
res = MBED_TEST_FILESYSTEM::format(&bd);
|
||||
TEST_ASSERT_EQUAL(0, res);
|
||||
res = fs.mount(&bd);
|
||||
|
@ -271,6 +271,7 @@ void test_simple_file_seek()
|
|||
TEST_ASSERT_EQUAL(0, res);
|
||||
|
||||
{
|
||||
size_t size;
|
||||
res = fs.mount(&bd);
|
||||
TEST_ASSERT_EQUAL(0, res);
|
||||
res = file[0].open(&fs, "hello/kitty42", O_RDONLY);
|
||||
|
@ -318,7 +319,7 @@ void test_simple_file_seek()
|
|||
res = memcmp(buffer, "kittycatcat", size);
|
||||
TEST_ASSERT_EQUAL(0, res);
|
||||
|
||||
size_t size = file[0].size();
|
||||
size = file[0].size();
|
||||
res = file[0].seek(0, SEEK_CUR);
|
||||
TEST_ASSERT_EQUAL(size, res);
|
||||
res = file[0].close();
|
||||
|
@ -337,6 +338,7 @@ void test_large_file_seek()
|
|||
TEST_ASSERT_EQUAL(0, res);
|
||||
|
||||
{
|
||||
size_t size;
|
||||
res = fs.mount(&bd);
|
||||
TEST_ASSERT_EQUAL(0, res);
|
||||
res = file[0].open(&fs, "hello/kitty42", O_RDONLY);
|
||||
|
@ -384,7 +386,7 @@ void test_large_file_seek()
|
|||
res = memcmp(buffer, "kittycatcat", size);
|
||||
TEST_ASSERT_EQUAL(0, res);
|
||||
|
||||
size_t size = file[0].size();
|
||||
size = file[0].size();
|
||||
res = file[0].seek(0, SEEK_CUR);
|
||||
TEST_ASSERT_EQUAL(size, res);
|
||||
res = file[0].close();
|
||||
|
@ -403,6 +405,7 @@ void test_simple_file_seek_and_write()
|
|||
TEST_ASSERT_EQUAL(0, res);
|
||||
|
||||
{
|
||||
size_t size;
|
||||
res = fs.mount(&bd);
|
||||
TEST_ASSERT_EQUAL(0, res);
|
||||
res = file[0].open(&fs, "hello/kitty42", O_RDWR);
|
||||
|
@ -450,7 +453,7 @@ void test_simple_file_seek_and_write()
|
|||
res = memcmp(buffer, "kittycatcat", size);
|
||||
TEST_ASSERT_EQUAL(0, res);
|
||||
|
||||
size_t size = file[0].size();
|
||||
size = file[0].size();
|
||||
res = file[0].seek(0, SEEK_CUR);
|
||||
TEST_ASSERT_EQUAL(size, res);
|
||||
res = file[0].close();
|
||||
|
@ -469,6 +472,7 @@ void test_large_file_seek_and_write()
|
|||
TEST_ASSERT_EQUAL(0, res);
|
||||
|
||||
{
|
||||
size_t size;
|
||||
res = fs.mount(&bd);
|
||||
TEST_ASSERT_EQUAL(0, res);
|
||||
res = file[0].open(&fs, "hello/kitty42", O_RDWR);
|
||||
|
@ -518,7 +522,7 @@ void test_large_file_seek_and_write()
|
|||
res = memcmp(buffer, "kittycatcat", size);
|
||||
TEST_ASSERT_EQUAL(0, res);
|
||||
|
||||
size_t size = file[0].size();
|
||||
size = file[0].size();
|
||||
res = file[0].seek(0, SEEK_CUR);
|
||||
TEST_ASSERT_EQUAL(size, res);
|
||||
res = file[0].close();
|
||||
|
@ -537,6 +541,7 @@ void test_boundary_seek_and_write()
|
|||
TEST_ASSERT_EQUAL(0, res);
|
||||
|
||||
{
|
||||
size_t size;
|
||||
res = fs.mount(&bd);
|
||||
TEST_ASSERT_EQUAL(0, res);
|
||||
res = file[0].open(&fs, "hello/kitty42", O_RDWR);
|
||||
|
@ -583,6 +588,7 @@ void test_out_of_bounds_seek()
|
|||
TEST_ASSERT_EQUAL(0, res);
|
||||
|
||||
{
|
||||
size_t size;
|
||||
res = fs.mount(&bd);
|
||||
TEST_ASSERT_EQUAL(0, res);
|
||||
res = file[0].open(&fs, "hello/kitty42", O_RDWR);
|
||||
|
|
Loading…
Reference in New Issue