From: Zbigniew Jędrzejewski-Szmek Date: Wed, 1 Nov 2017 21:32:22 +0000 (+0100) Subject: Remove a bunch of unused variables X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=24ed122798bcc6bf5f9652d4ea00768c29e3c6a0;p=elogind.git Remove a bunch of unused variables gcc does not warn about those, because of the _cleanup_ usage. clang is smarter here. --- diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c index d205870c2..20e22ad6e 100644 --- a/src/basic/terminal-util.c +++ b/src/basic/terminal-util.c @@ -248,7 +248,6 @@ int ask_string(char **ret, const char *text, ...) { int reset_terminal_fd(int fd, bool switch_to_text) { struct termios termios; - _cleanup_free_ char *utf8 = NULL; int r = 0; /* Set terminal to some sane defaults */ diff --git a/src/login/logind-session.c b/src/login/logind-session.c index ff1552b8a..e9834c9bd 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -1217,7 +1217,6 @@ void session_restore_vt(Session *s) { .mode = VT_AUTO, }; - _cleanup_free_ char *utf8 = NULL; int vt, old_fd; /* We need to get a fresh handle to the virtual terminal,