From owner-svn-src-all@FreeBSD.ORG Tue May 22 11:53:41 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79DDF1065673; Tue, 22 May 2012 11:53:41 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 01D428FC19; Tue, 22 May 2012 11:53:40 +0000 (UTC) Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q4MBrWv4023321 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 22 May 2012 21:53:33 +1000 Date: Tue, 22 May 2012 21:53:32 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Hartmut Brandt In-Reply-To: <201205220959.q4M9xoB2095552@svn.freebsd.org> Message-ID: <20120522214349.I1971@besplex.bde.org> References: <201205220959.q4M9xoB2095552@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r235780 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2012 11:53:41 -0000 On Tue, 22 May 2012, Hartmut Brandt wrote: > Log: > Fix a compilation error with some compilers: __attribute__ > requires two parenthesis for its argument, but instead of using > __attribute__ directly, use the appropriate __nonnull macro > from cdefs.h. This also fixes: - the style bug of hard-coding __attribute__(()) - the namespace pollution of using nonnull() instead of __nonnull__(). > Modified: head/include/malloc_np.h > ============================================================================== > --- head/include/malloc_np.h Tue May 22 09:27:57 2012 (r235779) > +++ head/include/malloc_np.h Tue May 22 09:59:49 2012 (r235780) > @@ -55,13 +55,11 @@ int mallctlbymib(const size_t *mib, size > #define ALLOCM_ERR_OOM 1 > #define ALLOCM_ERR_NOT_MOVED 2 > > -int allocm(void **ptr, size_t *rsize, size_t size, int flags) > - __attribute__(nonnull(1)); > +int allocm(void **ptr, size_t *rsize, size_t size, int flags) __nonnull(1); > int rallocm(void **ptr, size_t *rsize, size_t size, size_t extra, > - int flags) __attribute__(nonnull(1)); > -int sallocm(const void *ptr, size_t *rsize, int flags) > - __attribute__(nonnull(1)); > -int dallocm(void *ptr, int flags) __attribute__(nonnull(1)); > + int flags) __nonnull(1); > +int sallocm(const void *ptr, size_t *rsize, int flags) __nonnull(1); > +int dallocm(void *ptr, int flags) __nonnull(1); > int nallocm(size_t *rsize, size_t size, int flags); > __END_DECLS Many unfixed bugs are visible nearby, starting with the namespace pollution of parameter names in the application namespace. Bruce