[RFC 1/3] eal: add macro to warn for unused function return values

Stephen Hemminger stephen at networkplumber.org
Sun Apr 10 20:02:10 CEST 2022


On Sun, 10 Apr 2022 15:51:38 +0200
Mattias Rönnblom <mattias.ronnblom at ericsson.com> wrote:

> This patch adds a wrapper macro __rte_warn_unused_result for the
> warn_unused_result function attribute.
> 
> Marking a function __rte_warn_unused_result will make the compiler
> emit a warning in case the caller does not use the function's return
> value.
> 
> Signed-off-by: Mattias Rönnblom <mattias.ronnblom at ericsson.com>

Looks good, but are these attributes compiler specific?


More information about the dev mailing list