aboutsummaryrefslogtreecommitdiff
path: root/gdb/go32-nat.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-11-16 11:38:49 +0000
committerPedro Alves <palves@redhat.com>2016-11-17 00:59:43 +0000
commit200069c74f42ffcc726b9995a46971a86286a256 (patch)
tree00be16a40f21dbbc6e2e196dd33c4ec647af9206 /gdb/go32-nat.c
parent19f1935d91bfabbe4176ffdaca95bc789b593153 (diff)
downloadgdb-200069c74f42ffcc726b9995a46971a86286a256.zip
gdb-200069c74f42ffcc726b9995a46971a86286a256.tar.gz
gdb-200069c74f42ffcc726b9995a46971a86286a256.tar.bz2
gdb/ada-lang.c: one malloc -> unique_ptr<[]>
Switching gdb to use gnulib's C++ namespace mode reveals we're calling malloc instead of xmalloc here: ..../src/gdb/ada-lang.c: In function ‘value* ada_value_primitive_packed_val(value*, const gdb_byte*, long int, int, int, type*)’: ..../src/gdb/ada-lang.c:2592:50: error: call to ‘malloc’ declared with attribute warning: The symbol ::malloc refers to the system function. Use gnulib::malloc instead. [-Werror] staging = (gdb_byte *) malloc (staging_len); ^ We're unconditionaly using the result afterwards -- so it's not a case of gracefully handling huge allocations. Since we want to get rid of all cleanups, fix this by switching to new[] and unique_ptr<[]> instead, while at it. Regtested on Fedora 23. gdb/ChangeLog: 2016-11-16 Pedro Alves <palves@redhat.com> * ada-lang.c (ada_value_primitive_packed_val): Use unique_ptr and new gdb_byte[] instead of malloc and cleanups.
Diffstat (limited to 'gdb/go32-nat.c')
0 files changed, 0 insertions, 0 deletions