Binutils fails to build with -O0
authorAlan Modra <amodra@gmail.com>
Tue, 22 Mar 2016 03:50:18 +0000 (14:20 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 22 Mar 2016 03:54:30 +0000 (14:24 +1030)
PR 19851
* plugin.c (try_load_plugin): Avoid -Wstack-usage warning.

bfd/ChangeLog
bfd/plugin.c

index 43c9c285df032d6a6daf40af7c819ffd44a098db..ffafbf631f65f7f4ee0e3dc7eedea662805a71a7 100644 (file)
@@ -1,3 +1,8 @@
+2016-03-22  Alan Modra  <amodra@gmail.com>
+
+       PR 19851
+       * plugin.c (try_load_plugin): Avoid -Wstack-usage warning.
+
 2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * archures.c (bfd_mach_arc_nps400): Define.
index 82a87d6b7a57c05849b3bda4fac4e3c48875bb3c..f57833c1fb43703a4169eff7310d5d88bf8b47f9 100644 (file)
@@ -206,8 +206,7 @@ static int
 try_load_plugin (const char *pname, bfd *abfd, int *has_plugin_p)
 {
   void *plugin_handle;
-  int tv_size = 4;
-  struct ld_plugin_tv tv[tv_size];
+  struct ld_plugin_tv tv[4];
   int i;
   ld_plugin_onload onload;
   enum ld_plugin_status status;