chiark / gitweb /
Remove a bunch of unused variables
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 1 Nov 2017 21:32:22 +0000 (22:32 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 1 Nov 2017 21:32:22 +0000 (22:32 +0100)
gcc does not warn about those, because of the _cleanup_ usage.
clang is smarter here.

src/basic/terminal-util.c
src/login/logind-session.c

index d205870c2c9acb01941c927f0462c354215b1e66..20e22ad6e74da503944e69650fa0e072ecf91e2e 100644 (file)
@@ -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 */
index ff1552b8a129d7ccb495a4a9eacc1824beb1dbc1..e9834c9bd7beb23bda509b707261d786ec239464 100644 (file)
@@ -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,