summaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2007-01-03 19:01:25 +0000
committerDaniel Jacobowitz <dan@debian.org>2007-01-03 19:01:25 +0000
commitbc6bd94ef305af92bef109fccd29ff7fa2f5b1df (patch)
tree1c27629840cbb31b260b05672684996a737c7e14 /gdb/tui
parente29ccd94d50ba80814dda0612394e4f489ace3b4 (diff)
downloadgdb-bc6bd94ef305af92bef109fccd29ff7fa2f5b1df.tar.gz
Warning fixes.
* ada-lang.c (find_struct_field): Initialize *byte_offset_p. * breakpoint.c (do_enable_breakpoint): Ignore both mem_cnt and i. * c-typeprint.c (c_type_print_varspec_suffix): Don't test length greater than or equal to zero. * m2-typeprint.c (m2_array): Likewise. * p-typeprint.c (pascal_type_print_varspec_prefix): Likewise. * gdbtypes.c (copy_type_recursive): Correct == typo. * i386-tdep.c (i386_skip_prologue): Remove stray semicolon. * linux-nat.c (linux_nat_info_proc_cmd): Don't compare a pointer greater than zero. * macroscope.c (sal_macro_scope): Don't name a local variable "main". (default_macro_scope): Remove unused variable. * prologue-value.h (pv_area_find_reg): Don't name an argument "register". * remote-fileio.c (remote_fio_func_map): Add missing braces. * remote.c (sigint_remote_twice_token, sigint_remote_token): Change type. (cleanup_sigint_signal_handler): Remove casts. * valprint.c (val_print): Use a volatile local for the modified argument. * varobj.c (languages): Remove extra array dimension. (varobj_create): Correct access to languages array. * mi/mi-cmd-break.c (mi_cmd_break_insert, mi_cmd_break_watch): Add missing braces. * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise. * mi/mi-cmd-env.c (mi_cmd_env_path, mi_cmd_env_dir): Likewise. * mi/mi-getopt.c (mi_valid_noargs): Likewise. * mi/mi-main.c (mi_cmd_data_read_memory): Likewise. (mi_cmd_data_write_memory): Likewise. * signals/signals.c (target_signal_to_string): Cast to int before comparing. * tui/tui-layout.c (init_and_make_win): Take and return a void *. Update all callers.
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/tui-layout.c110
1 files changed, 55 insertions, 55 deletions
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index 2690c49a4d9..37b70a1693a 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -47,7 +47,7 @@
********************************/
static void show_layout (enum tui_layout_type);
static void init_gen_win_info (struct tui_gen_win_info *, enum tui_win_type, int, int, int, int);
-static void init_and_make_win (void **, enum tui_win_type, int, int, int, int, int);
+static void *init_and_make_win (void *, enum tui_win_type, int, int, int, int, int);
static void show_source_or_disasm_and_command (enum tui_layout_type);
static void make_source_or_disasm_window (struct tui_win_info * *, enum tui_win_type, int, int);
static void make_command_window (struct tui_win_info * *, int, int);
@@ -640,13 +640,13 @@ prev_layout (void)
static void
make_command_window (struct tui_win_info * * win_info_ptr, int height, int origin_y)
{
- init_and_make_win ((void **) win_info_ptr,
- CMD_WIN,
- height,
- tui_term_width (),
- 0,
- origin_y,
- DONT_BOX_WINDOW);
+ *win_info_ptr = init_and_make_win (*win_info_ptr,
+ CMD_WIN,
+ height,
+ tui_term_width (),
+ 0,
+ origin_y,
+ DONT_BOX_WINDOW);
(*win_info_ptr)->can_highlight = FALSE;
}
@@ -679,13 +679,13 @@ make_disasm_window (struct tui_win_info * * win_info_ptr, int height, int origin
static void
make_data_window (struct tui_win_info * * win_info_ptr, int height, int origin_y)
{
- init_and_make_win ((void **) win_info_ptr,
- DATA_WIN,
- height,
- tui_term_width (),
- 0,
- origin_y,
- BOX_WINDOW);
+ *win_info_ptr = init_and_make_win (*win_info_ptr,
+ DATA_WIN,
+ height,
+ tui_term_width (),
+ 0,
+ origin_y,
+ BOX_WINDOW);
}
@@ -751,13 +751,13 @@ show_source_disasm_command (void)
if (TUI_DISASM_WIN == NULL)
{
make_disasm_window (&TUI_DISASM_WIN, asm_height, src_height - 1);
- init_and_make_win ((void **) & locator,
- LOCATOR_WIN,
- 2 /* 1 */ ,
- tui_term_width (),
- 0,
- (src_height + asm_height) - 1,
- DONT_BOX_WINDOW);
+ locator = init_and_make_win (locator,
+ LOCATOR_WIN,
+ 2 /* 1 */ ,
+ tui_term_width (),
+ 0,
+ (src_height + asm_height) - 1,
+ DONT_BOX_WINDOW);
}
else
{
@@ -844,13 +844,13 @@ show_data (enum tui_layout_type new_layout)
make_source_window (&tui_win_list[win_type], src_height, data_height - 1);
else
make_disasm_window (&tui_win_list[win_type], src_height, data_height - 1);
- init_and_make_win ((void **) & locator,
- LOCATOR_WIN,
- 2 /* 1 */ ,
- tui_term_width (),
- 0,
- total_height - 1,
- DONT_BOX_WINDOW);
+ locator = init_and_make_win (locator,
+ LOCATOR_WIN,
+ 2 /* 1 */ ,
+ tui_term_width (),
+ 0,
+ total_height - 1,
+ DONT_BOX_WINDOW);
}
else
{
@@ -911,11 +911,11 @@ init_gen_win_info (struct tui_gen_win_info * win_info, enum tui_win_type type,
/*
** init_and_make_win().
*/
-static void
-init_and_make_win (void ** win_info_ptr, enum tui_win_type win_type,
- int height, int width, int origin_x, int origin_y, int box_it)
+static void *
+init_and_make_win (void *opaque_win_info, enum tui_win_type win_type,
+ int height, int width, int origin_x, int origin_y,
+ int box_it)
{
- void *opaque_win_info = *win_info_ptr;
struct tui_gen_win_info * generic;
if (opaque_win_info == NULL)
@@ -942,7 +942,7 @@ init_and_make_win (void ** win_info_ptr, enum tui_win_type win_type,
}
tui_make_window (generic, box_it);
}
- *win_info_ptr = opaque_win_info;
+ return opaque_win_info;
}
@@ -959,23 +959,23 @@ make_source_or_disasm_window (struct tui_win_info * * win_info_ptr, enum tui_win
execution_info = tui_source_exec_info_win_ptr ();
else
execution_info = tui_disassem_exec_info_win_ptr ();
- init_and_make_win ((void **) & execution_info,
- EXEC_INFO_WIN,
- height,
- 3,
- 0,
- origin_y,
- DONT_BOX_WINDOW);
+ execution_info = init_and_make_win (execution_info,
+ EXEC_INFO_WIN,
+ height,
+ 3,
+ 0,
+ origin_y,
+ DONT_BOX_WINDOW);
/*
** Now create the source window.
*/
- init_and_make_win ((void **) win_info_ptr,
- type,
- height,
- tui_term_width () - execution_info->width,
- execution_info->width,
- origin_y,
- BOX_WINDOW);
+ *win_info_ptr = init_and_make_win (*win_info_ptr,
+ type,
+ height,
+ tui_term_width () - execution_info->width,
+ execution_info->width,
+ origin_y,
+ BOX_WINDOW);
(*win_info_ptr)->detail.source_info.execution_info = execution_info;
}
@@ -1009,13 +1009,13 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type)
make_source_window (win_info_ptr, src_height - 1, 0);
else
make_disasm_window (win_info_ptr, src_height - 1, 0);
- init_and_make_win ((void **) & locator,
- LOCATOR_WIN,
- 2 /* 1 */ ,
- tui_term_width (),
- 0,
- src_height - 1,
- DONT_BOX_WINDOW);
+ locator = init_and_make_win (locator,
+ LOCATOR_WIN,
+ 2 /* 1 */ ,
+ tui_term_width (),
+ 0,
+ src_height - 1,
+ DONT_BOX_WINDOW);
}
else
{