This change fixes compiler option -Werror=nonnull option warning: login-utils/sulogin-consoles.c: In function 'append_console': login-utils/sulogin-consoles.c:324:14: warning: nonnull argument 'consoles' compared to NULL [-Wnonnull-compare] The NULL check done with list_empty() looks valid, so it is best to remove the function attribute that allows compiler to optimize the check away. Signed-off-by: Sami Kerola <kerolasa@xxxxxx> --- login-utils/sulogin-consoles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/login-utils/sulogin-consoles.c b/login-utils/sulogin-consoles.c index 1644da5..595b516 100644 --- a/login-utils/sulogin-consoles.c +++ b/login-utils/sulogin-consoles.c @@ -311,7 +311,7 @@ out: */ static #ifdef __GNUC__ -__attribute__((__nonnull__,__hot__)) +__attribute__((__hot__)) #endif int append_console(struct list_head *consoles, const char *name) { -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html