+2014-06-20 Tom Tromey <tromey@redhat.com>
+
+ * dwarf2read.c (dw2_get_real_path): Use correct type in
+ OBSTACK_CALLOC.
+ * gdb_obstack.h (OBSTACK_ZALLOC, OBSTACK_CALLOC): Cast result.
+
2014-06-20 Gary Benson <gbenson@redhat.com>
* common/gdb_thread_db.h: Moved to nat. All includes updated.
{
if (qfn->real_names == NULL)
qfn->real_names = OBSTACK_CALLOC (&objfile->objfile_obstack,
- qfn->num_file_names, char *);
+ qfn->num_file_names, const char *);
if (qfn->real_names[index] == NULL)
qfn->real_names[index] = gdb_realpath (qfn->file_names[index]);
/* Utility macros - wrap obstack alloc into something more robust. */
#define OBSTACK_ZALLOC(OBSTACK,TYPE) \
- (memset (obstack_alloc ((OBSTACK), sizeof (TYPE)), 0, sizeof (TYPE)))
+ ((TYPE *) memset (obstack_alloc ((OBSTACK), sizeof (TYPE)), 0, sizeof (TYPE)))
#define OBSTACK_CALLOC(OBSTACK,NUMBER,TYPE) \
- (memset (obstack_alloc ((OBSTACK), (NUMBER) * sizeof (TYPE)), \
- 0, (NUMBER) * sizeof (TYPE)))
+ ((TYPE *) memset (obstack_alloc ((OBSTACK), (NUMBER) * sizeof (TYPE)), \
+ 0, (NUMBER) * sizeof (TYPE)))
/* Unless explicitly specified, GDB obstacks always use xmalloc() and
xfree(). */