This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: More fixes from static analysis checkers


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]