]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sulogin: remove __nonnull__ function attribute
authorSami Kerola <kerolasa@iki.fi>
Sat, 2 Jul 2016 09:28:55 +0000 (10:28 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 14 Jul 2016 10:28:53 +0000 (12:28 +0200)
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@iki.fi>
login-utils/sulogin-consoles.c

index 1644da5ce5f594ddfa142b1b12e9c66059cafb9c..595b5165da8ed3ac8837e1022fdffd51d2ab7d4d 100644 (file)
@@ -311,7 +311,7 @@ out:
  */
 static
 #ifdef __GNUC__
-__attribute__((__nonnull__,__hot__))
+__attribute__((__hot__))
 #endif
 int append_console(struct list_head *consoles, const char *name)
 {