This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] malloc/hooks.c: Mark variable as unused
- From: Marek Polacek <mpolacek at redhat dot com>
- To: libc-alpha <libc-alpha at sourceware dot org>
- Date: Sat, 02 Jul 2011 19:05:42 +0200
- Subject: [PATCH] malloc/hooks.c: Mark variable as unused
Prevent ``set but not used'' warning (GCC >4.6) by marking variable `nb' as
unused.
2011-07-02 Marek Polacek <mpolacek@redhat.com>
* malloc/hooks.c (memalign_check): Mark variable as unused.
--- gdb/malloc/hooks.c.mp 2011-07-02 17:39:04.942448793 +0200
+++ gdb/malloc/hooks.c 2011-07-02 18:52:25.575270925 +0200
@@ -1,5 +1,5 @@
/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 2001-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@malloc.de>, 2001.
@@ -398,7 +398,7 @@ memalign_check(alignment, bytes, caller)
size_t alignment; size_t bytes; const Void_t *caller;
#endif
{
- INTERNAL_SIZE_T nb;
+ INTERNAL_SIZE_T nb __attribute__ ((unused));
Void_t* mem;
if (alignment <= MALLOC_ALIGNMENT) return malloc_check(bytes, NULL);