[PATCH v5 1/4] eal: add nonnull and access function attributes

Thomas Monjalon thomas at monjalon.net
Mon Jan 9 12:08:50 CET 2023


28/12/2022 16:10, Morten Brørup:
> Add "nonnull" function attribute to help the compiler detect a NULL
> pointer being passed to a function not accepting NULL pointers as an
> argument at build time.
> 
> Add "access" function attribute to tell the compiler how a function
> accesses its pointer arguments.

Why access specification is needed?
Isn't it enough to have the const keyword?
I'm afraid we are going to make the code ugly to read with such attribute.






More information about the dev mailing list