diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-04-17 16:59:57 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-04-17 16:59:57 +0200 |
commit | 2e3897490e0f99b22a2813cfb34d59a1ea71ff68 (patch) | |
tree | 694c8b8b270f33ea3477a22df070bd0366ebf6fb /gcc/c | |
parent | 1dfc50232dcb703454db4f54c538042a32be2138 (diff) | |
download | gcc-2e3897490e0f99b22a2813cfb34d59a1ea71ff68.zip gcc-2e3897490e0f99b22a2813cfb34d59a1ea71ff68.tar.gz gcc-2e3897490e0f99b22a2813cfb34d59a1ea71ff68.tar.bz2 |
c, c++: Fix two redundantAssignment warnings [PR94629]
This change fixes two obvious redundant assignments reported by cppcheck:
trunk.git/gcc/c/c-parser.c:16969:2: style: Variable 'data.clauses' is reassigned a value before the old one has been used. [redundantAssignment]
trunk.git/gcc/cp/call.c:5116:9: style: Variable 'arg2' is reassigned a value before the old one has been used. [redundantAssignment]
2020-04-17 Jakub Jelinek <jakub@redhat.com>
PR other/94629
* c-parser.c (c_parser_oacc_routine): Remove redundant assignment
to data.clauses.
* call.c (build_conditional_expr_1): Remove redundant assignment to
arg2.
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c/c-parser.c | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index a1831d4..b6af676 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2020-04-17 Jakub Jelinek <jakub@redhat.com> + + PR other/94629 + * c-parser.c (c_parser_oacc_routine): Remove redundant assignment + to data.clauses. + 2020-04-15 Jakub Jelinek <jakub@redhat.com> PR c/94593 diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index 679c14d..4e90d55 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -16939,7 +16939,6 @@ c_parser_oacc_routine (c_parser *parser, enum pragma_context context) oacc_routine_data data; data.error_seen = false; data.fndecl_seen = false; - data.clauses = NULL_TREE; data.loc = c_parser_peek_token (parser)->location; c_parser_consume_pragma (parser); |