diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-09-17 17:30:47 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-09-17 19:08:51 -0400 |
commit | 1dc2ced4646a78b3dee9e3ea44130f938d6425bc (patch) | |
tree | 74a9c4aee3b0dd50b8d2f6800915e3e43b302e47 | |
parent | 831dedef66dbf2650a9dc41263e624fe08f3bb7a (diff) |
Remove six unused variables and add annotation
clang FTW!
-rw-r--r-- | src/fstab-generator/fstab-generator.c | 4 | ||||
-rw-r--r-- | src/journal/test-journal-interleaving.c | 2 | ||||
-rw-r--r-- | src/login/logind-dbus.c | 1 | ||||
-rw-r--r-- | src/login/logind-session.c | 1 | ||||
-rw-r--r-- | src/machine/machined-dbus.c | 2 |
5 files changed, 3 insertions, 7 deletions
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index b73dfa4899..9efccb983d 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -64,7 +64,7 @@ static int mount_find_pri(struct mntent *me, int *ret) { } static int add_swap(const char *what, struct mntent *me) { - _cleanup_free_ char *name = NULL, *unit = NULL, *lnk = NULL, *device = NULL; + _cleanup_free_ char *name = NULL, *unit = NULL, *lnk = NULL; _cleanup_fclose_ FILE *f = NULL; bool noauto; int r, pri = -1; @@ -159,7 +159,7 @@ static int add_mount( const char *post, const char *source) { _cleanup_free_ char - *name = NULL, *unit = NULL, *lnk = NULL, *device = NULL, + *name = NULL, *unit = NULL, *lnk = NULL, *automount_name = NULL, *automount_unit = NULL; _cleanup_fclose_ FILE *f = NULL; diff --git a/src/journal/test-journal-interleaving.c b/src/journal/test-journal-interleaving.c index 2b21523f57..1a058eaedd 100644 --- a/src/journal/test-journal-interleaving.c +++ b/src/journal/test-journal-interleaving.c @@ -36,7 +36,7 @@ static bool arg_keep = false; -static void log_assert_errno(const char *text, int eno, const char *file, int line, const char *func) { +_noreturn_ static void log_assert_errno(const char *text, int eno, const char *file, int line, const char *func) { log_meta(LOG_CRIT, file, line, func, "'%s' failed at %s:%u (%s): %s.", text, file, line, func, strerror(eno)); diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index fd8ee1b801..ec590c0c56 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -2395,7 +2395,6 @@ DBusHandlerResult bus_message_filter( } else if (dbus_message_is_signal(message, "org.freedesktop.DBus.Properties", "PropertiesChanged")) { - _cleanup_dbus_message_unref_ DBusMessage *reply = NULL; _cleanup_free_ char *unit = NULL; const char *path; diff --git a/src/login/logind-session.c b/src/login/logind-session.c index ce982efed4..27aa335142 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -259,7 +259,6 @@ int session_load(Session *s) { *seat = NULL, *vtnr = NULL, *leader = NULL, - *audit_id = NULL, *type = NULL, *class = NULL, *uid = NULL, diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c index 5a016e76bc..a526a5243e 100644 --- a/src/machine/machined-dbus.c +++ b/src/machine/machined-dbus.c @@ -117,7 +117,6 @@ static bool valid_machine_name(const char *p) { static int bus_manager_create_machine(Manager *manager, DBusMessage *message) { const char *name, *service, *class, *root_directory; - _cleanup_free_ char *p = NULL; DBusMessageIter iter, sub; MachineClass c; uint32_t leader; @@ -560,7 +559,6 @@ DBusHandlerResult bus_message_filter( } else if (dbus_message_is_signal(message, "org.freedesktop.DBus.Properties", "PropertiesChanged")) { - _cleanup_dbus_message_unref_ DBusMessage *reply = NULL; _cleanup_free_ char *unit = NULL; const char *path; |