This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: More fixes from static analysis checkers
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 25 May 2011 19:28:36 +0200
- Subject: Re: More fixes from static analysis checkers
- References: <4D8BBD39.1020901@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Mar 24, 2011 at 03:52:57PM -0600, Jeff Law wrote:
> We had a variety of functions which would fail to call va_end prior to
> returning. I'm not aware of a host were this could cause a problem, but
> it's easy enough to fix and keeps the checkers quiet.
In case of def_fn_type, this added a second va_end if the function
doesn't fail.
This patch removes the first va_end, bootstrapped/regtested on x86_64-linux
and i686-linux, committed as obvious.
2011-05-25 Jakub Jelinek <jakub@redhat.com>
* c-common.c (def_fn_type): Remove extra va_end.
* gcc-interface/utils.c (def_fn_type): Remove extra va_end.
--- gcc/c-family/c-common.c.jj 2011-05-24 23:34:16.000000000 +0200
+++ gcc/c-family/c-common.c 2011-05-25 16:50:57.000000000 +0200
@@ -4451,7 +4451,6 @@ def_fn_type (builtin_type def, builtin_t
goto egress;
args[i] = t;
}
- va_end (list);
t = builtin_types[ret];
if (t == error_mark_node)
--- gcc/ada/gcc-interface/utils.c.jj 2011-05-11 19:38:55.000000000 +0200
+++ gcc/ada/gcc-interface/utils.c 2011-05-25 16:52:00.000000000 +0200
@@ -4965,7 +4965,6 @@ def_fn_type (builtin_type def, builtin_t
goto egress;
args[i] = t;
}
- va_end (list);
t = builtin_types[ret];
if (t == error_mark_node)
Jakub