Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 May 2009 22:20:32 -0700
From:      Marcel Moolenaar <xcllnt@mac.com>
To:        Doug Barton <dougb@dougbarton.us>
Cc:        freebsd-ia64@freebsd.org, bind-users@isc.org
Subject:   Re: 9.6.1rc1 + FreeBSD 8 + IA64 compile problem
Message-ID:  <A8B660E9-FE40-456C-81CE-F4C2261E61EB@mac.com>
In-Reply-To: <4A22CD21.9040309@dougbarton.us>
References:  <4A22CD21.9040309@dougbarton.us>

next in thread | previous in thread | raw e-mail | index | archive | help

--Boundary_(ID_fufyExBh/OA5SsQuXw4IQw)
Content-type: text/plain; charset=US-ASCII; format=flowed
Content-transfer-encoding: 7BIT


On May 31, 2009, at 11:32 AM, Doug Barton wrote:
>
> I also tried various other combinations of removing the #ifdef,
> running it all onto the same line, etc. I'm not really familiar with
> this usage of __attribute__ so I'm at a bit of a loss.

My suggestion is to remove the whole attribute construct (see attached).
It only suppresses a warning when a function is unused. In this case
the function is defined as inline, so it's not causing a warning when
not used.

With the attached patch, the code compiles without errors or warnings
on FreeBSD/ia64.

FYI,

-- 
Marcel Moolenaar
xcllnt@mac.com



--Boundary_(ID_fufyExBh/OA5SsQuXw4IQw)
Content-type: application/octet-stream; x-unix-mode=0700; name=bind9.diff
Content-transfer-encoding: 7bit
Content-disposition: attachment; filename=bind9.diff

Index: atomic.h
===================================================================
--- atomic.h	(revision 193194)
+++ atomic.h	(working copy)
@@ -32,9 +32,6 @@
  */
 static inline isc_int32_t
 isc_atomic_xadd(isc_int32_t *p, isc_int32_t val)
-#ifdef __GNUC__
-__attribute__ ((unused))
-#endif
 {
 	isc_int32_t prev, swapped;
 
@@ -58,9 +55,6 @@
  */
 static inline void
 isc_atomic_store(isc_int32_t *p, isc_int32_t val)
-#ifdef __GNUC__
-__attribute__ ((unused))
-#endif
 {
 	__asm__ volatile(
 		"st4.rel %0=%1"
@@ -77,9 +71,6 @@
  */
 static inline isc_int32_t
 isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val)
-#ifdef __GNUC__
-__attribute__ ((unused))
-#endif
 {
 	isc_int32_t ret;
 

--Boundary_(ID_fufyExBh/OA5SsQuXw4IQw)--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A8B660E9-FE40-456C-81CE-F4C2261E61EB>