diff --git a/libs/libc/stdio/lib_fopen.c b/libs/libc/stdio/lib_fopen.c index 160c3e764a9..40df4882c1c 100644 --- a/libs/libc/stdio/lib_fopen.c +++ b/libs/libc/stdio/lib_fopen.c @@ -45,11 +45,6 @@ * or creating file */ #define MODE_A (1 << 2) /* Bit 2: "a{b|x|+}" open for writing, appending * the to file */ -#define MODE_PLUS (1 << 3) /* Bit 3: "{r|w|a|b|x}+" open for update (reading - * and writing) */ -#define MODE_B (1 << 4) /* Bit 4: "{r|w|a|x|+}b" Binary mode */ -#define MODE_X (1 << 5) /* Bit 5: "{r|w|a|b|+}x" Open exclusive mode */ -#define MODE_T (1 << 6) /* Bit 6: "{r|w|a|+}t" Text mode */ #define MODE_NONE 0 /* No access mode determined */ #define MODE_MASK (MODE_R | MODE_W | MODE_A) @@ -214,7 +209,6 @@ int lib_mode2oflags(FAR const char *mode) /* Open for read/write access */ oflags |= O_RDWR; - state |= MODE_PLUS; } break; @@ -229,7 +223,6 @@ int lib_mode2oflags(FAR const char *mode) */ oflags |= (O_RDWR | O_CREAT | O_TRUNC); - state |= MODE_PLUS; } break; @@ -244,7 +237,6 @@ int lib_mode2oflags(FAR const char *mode) */ oflags |= (O_RDWR | O_CREAT | O_APPEND); - state |= MODE_PLUS; } break; @@ -262,7 +254,6 @@ int lib_mode2oflags(FAR const char *mode) /* The file is opened in binary mode */ oflags |= O_BINARY; - state |= MODE_B; } else { @@ -278,7 +269,6 @@ int lib_mode2oflags(FAR const char *mode) /* The file is opened in exclusive mode */ oflags |= O_EXCL; - state |= MODE_X; } else { @@ -294,7 +284,6 @@ int lib_mode2oflags(FAR const char *mode) /* The file is opened in text mode */ oflags |= O_TEXT; - state |= MODE_T; } else {