This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

[gdb] fix build error in remote-sim.c


Build fails with the following message:
src/binutils/gdb/remote-sim.c:1207: error: 'result' may be used
uninitialized in this function.

This patch adds missing initialization.

Thanks,
Greta


Changelog

gdb/

2012-06-18  Greta Yorsh  <Greta.Yorsh@arm.com>

	* remote-sim.c (sim_command_completer): Initialize
	variable 'result'.



diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 11e1003..f5927f2 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -1204,7 +1204,7 @@ sim_command_completer (struct cmd_list_element
*ignore, char *text, char *word)
   struct sim_inferior_data *sim_data;
   char **tmp;
   int i;
-  VEC (char_ptr) *result;
+  VEC (char_ptr) *result = NULL;
 
   sim_data = inferior_data (current_inferior (), sim_inferior_data_key);
   if (sim_data == NULL || sim_data->gdbsim_desc == NULL)




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