[V5] Testsuite: Fix a redefinition bug for the fd-4.c

Message ID 20230412131840.29214-1-shiyulong@iscas.ac.cn
State Accepted
Headers
Series [V5] Testsuite: Fix a redefinition bug for the fd-4.c |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

shiyulong@iscas.ac.cn April 12, 2023, 1:18 p.m. UTC
  From: yulong <shiyulong@iscas.ac.cn>

This patch fix a redefinition bug.
There are have a definition about mode_t in the fd-4.c, but it duplicates the definition in types.h that be included by stdio.h.
Thanks to Jeff Law for reviewing the previous version.

gcc/testsuite/ChangeLog:

        * gcc.dg/analyzer/fd-4.c: delete the definition of mode_t.

---
 gcc/testsuite/gcc.dg/analyzer/fd-4.c | 5 -----
 1 file changed, 5 deletions(-)
  

Comments

Jeff Law April 28, 2023, 9:51 p.m. UTC | #1
On 4/12/23 07:18, shiyulong@iscas.ac.cn wrote:
> From: yulong <shiyulong@iscas.ac.cn>
> 
> This patch fix a redefinition bug.
> There are have a definition about mode_t in the fd-4.c, but it duplicates the definition in types.h that be included by stdio.h.
> Thanks to Jeff Law for reviewing the previous version.
> 
> gcc/testsuite/ChangeLog:
> 
>          * gcc.dg/analyzer/fd-4.c: delete the definition of mode_t.
This appears to be exactly the same as the prior version.  Ultimately 
David Malcolm needs to make a decision on whether or not to accept this 
patch as it's a patc for the analyzer's testsuite.

David -- comments?
jeff
  

Patch

diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-4.c b/gcc/testsuite/gcc.dg/analyzer/fd-4.c
index 994bad84342..9ec015679e9 100644
--- a/gcc/testsuite/gcc.dg/analyzer/fd-4.c
+++ b/gcc/testsuite/gcc.dg/analyzer/fd-4.c
@@ -13,11 +13,6 @@  int read (int fd, void *buf, int nbytes);
 #define O_WRONLY 1
 #define O_RDWR 2
 
-typedef enum {
-  S_IRWXU
-  // etc
-} mode_t;
-
 int creat (const char *, mode_t mode);
 
 void