[Freeipa-devel] [PATCH 0224-0225] Add function attributes warn_unused_result and nonnull and add missing CHECK()s to string operations

Nathaniel McCallum npmccallum at redhat.com
Fri Feb 21 15:20:41 UTC 2014


On Fri, 2014-02-21 at 16:17 +0100, Petr Spacek wrote:
> On 21.2.2014 16:16, Nathaniel McCallum wrote:
> > On Fri, 2014-02-21 at 16:12 +0100, Petr Spacek wrote:
> >> Hello,
> >>
> >> Add function attributes warn_unused_result and nonnull
> >> where appropriate and add missing CHECK()s to string operations.
> >>
> >> Lukas, thanks for catching the missing CHECK() around str_new().
> >>
> >> As a reward, you can review attached patches.
> >>
> >> Have fun! :-)
> >
> > NACK
> >
> > Adding attributes to a function definition is a no-op and can create
> > potential confusion should the definitions and declarations differ.
> >
> > I would strongly prefer that they are only used in function
> > declarations.
> >
> > Nathaniel
> 
> Sorry, but you are not right.
> 
> Attributes work perfectly fine for static functions without previous declaration.

Gah. You're right. I had assumed the header changes were duplicates of
the static functions. Please disregard.

Nathaniel




More information about the Freeipa-devel mailing list