forked from Imagelibrary/binutils-gdb
ARI fixes: sprintf rule.
Replace sprintf function calls for char arrays by calls to xsnprintf calls. * arm-tdep.c (arm_push_dummy_call): Replace sprintf by xsnprintf. (arm_dwarf_reg_to_regnum, arm_return_value): Ditto. (arm_neon_quad_read, arm_pseudo_read): Ditto. (arm_neon_quad_write, arm_pseudo_write): Ditto. * breakpoint.c (condition_completer): Ditto. (create_tracepoint_from_upload): Ditto. * dwarf2read.c (file_full_name): Ditto. * gcore.c (gcore_command): Ditto. * gnu-nat.c (proc_string, gnu_pid_to_str): Ditto. * go32-nat.c (go32_sysinfo): Ditto. * interps.c (interp_set): Ditto. * m32c-tdep.c (make_types): Ditto. * ppc-linux-nat.c (fetch_register, store_register): Ditto. * remote-m32r-sdi.c (m32r_open): Ditto. * sol-thread.c (td_err_string): Ditto. (td_state_string, solaris_pid_to_str): Ditto. * symtab.c (gdb_mangle_name): Ditto. * cli/cli-script.c (execute_control_command): Ditto. (define_command, document_command): Ditto. * tui/tui-io.c (tui_rl_display_match_list): Ditto. * tui/tui-stack.c (tui_make_status_line): Ditto. * tui/tui-win.c (tui_update_gdb_sizes): Ditto.
This commit is contained in:
@@ -1024,9 +1024,10 @@ condition_completer (struct cmd_list_element *cmd, char *text, char *word)
|
||||
char location[50];
|
||||
|
||||
if (single)
|
||||
sprintf (location, "%d", b->number);
|
||||
xsnprintf (location, sizeof (location), "%d", b->number);
|
||||
else
|
||||
sprintf (location, "%d.%d", b->number, count);
|
||||
xsnprintf (location, sizeof (location), "%d.%d", b->number,
|
||||
count);
|
||||
|
||||
if (strncmp (location, text, len) == 0)
|
||||
VEC_safe_push (char_ptr, result, xstrdup (location));
|
||||
@@ -15101,7 +15102,7 @@ create_tracepoint_from_upload (struct uploaded_tp *utp)
|
||||
warning (_("Uploaded tracepoint %d has no "
|
||||
"source location, using raw address"),
|
||||
utp->number);
|
||||
sprintf (small_buf, "*%s", hex_string (utp->addr));
|
||||
xsnprintf (small_buf, sizeof (small_buf), "*%s", hex_string (utp->addr));
|
||||
addr_str = small_buf;
|
||||
}
|
||||
|
||||
@@ -15132,7 +15133,8 @@ create_tracepoint_from_upload (struct uploaded_tp *utp)
|
||||
|
||||
if (utp->pass > 0)
|
||||
{
|
||||
sprintf (small_buf, "%d %d", utp->pass, tp->base.number);
|
||||
xsnprintf (small_buf, sizeof (small_buf), "%d %d", utp->pass,
|
||||
tp->base.number);
|
||||
|
||||
trace_pass_command (small_buf, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user