[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH 56/57] Add arguments to malloc and calloc proto
From: |
Tommi Rantala |
Subject: |
[Libunwind-devel] [PATCH 56/57] Add arguments to malloc and calloc prototypes in Ltest-nocalloc |
Date: |
Fri, 21 Sep 2012 14:11:57 +0300 |
---
tests/Ltest-nocalloc.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/Ltest-nocalloc.c b/tests/Ltest-nocalloc.c
index 155cce3..fb0c981 100644
--- a/tests/Ltest-nocalloc.c
+++ b/tests/Ltest-nocalloc.c
@@ -40,17 +40,17 @@ int in_unwind;
void *
calloc(size_t n, size_t s)
{
- static void * (*func)();
+ static void * (*func)(size_t, size_t);
#ifdef __GLIBC__
/* In glibc, dlsym() calls calloc. Calling dlsym(RTLD_NEXT, "calloc") here
causes infinite recursion. Instead, we simply use it by its other
name. */
- extern void *__libc_calloc();
+ extern void *__libc_calloc(size_t, size_t);
func = &__libc_calloc;
#else
if(!func)
- func = (void *(*)()) dlsym(RTLD_NEXT, "calloc");
+ func = dlsym(RTLD_NEXT, "calloc");
#endif
if (in_unwind) {
@@ -64,10 +64,10 @@ calloc(size_t n, size_t s)
void *
malloc(size_t s)
{
- static void * (*func)();
+ static void * (*func)(size_t);
if(!func)
- func = (void *(*)()) dlsym(RTLD_NEXT, "malloc");
+ func = dlsym(RTLD_NEXT, "malloc");
if (in_unwind) {
num_mallocs++;
--
1.7.9.5
- Re: [Libunwind-devel] [PATCH 37/57] ppc32: `UNW_PPC32_REGS' fixlet, (continued)
- [Libunwind-devel] [PATCH 38/57] IA64: give prototype for `ia64_find_unwind_table()', Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 39/57] Set `_UPT_reg_offset' read only, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 41/57] Constify `operands' in src/dwarf/Gexpr.c, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 54/57] Replace empty argument lists with `void' in tests, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 51/57] Fix second operand read in dwarf_eval_expr(), Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 50/57] Teach autotools current ARM `ex_tables.h' location, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 48/57] Use `UNUSED' in tests, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 52/57] Apply `define_lock()', Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 49/57] Use shared `ARRAY_SIZE' in IA64 tests, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 56/57] Add arguments to malloc and calloc prototypes in Ltest-nocalloc,
Tommi Rantala <=
- [Libunwind-devel] [PATCH 55/57] Remove unused variable in Ltest-nocalloc, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 53/57] Prefer NULL over zero, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 35/57] SuperH port, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 47/57] Plug in `ALIAS' attribute, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 42/57] IA64: constify read only arrays in `tdep_init()', Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 45/57] Define and use `WEAK', Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 46/57] Define and use `CONST_ATTR', Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 43/57] Plug in `ARRAY_SIZE' in ptrace code, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 57/57] Assign `func' just once in Ltest-nocalloc glibc case, Tommi Rantala, 2012/09/21
- [Libunwind-devel] [PATCH 44/57] Define and use `NOINLINE', Tommi Rantala, 2012/09/21