locale: add _unused_ attribute for dummy variable

This suppresses the following warning by clang:
```
[588/1179] Compiling C object 'systemd-localed@exe/src_locale_localed.c.o'.
../src/locale/localed.c:271:39: warning: unused variable 'dummy' [-Wunused-variable]
        _cleanup_(locale_free) char **dummy = new_locale;
                                      ^
```
This commit is contained in:
Yu Watanabe 2018-06-06 17:13:12 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent 2b3df1963c
commit 60091993a9

View file

@ -267,11 +267,10 @@ static void locale_free(char ***l) {
static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *error) {
Context *c = userdata;
_cleanup_strv_free_ char **settings = NULL, **l = NULL;
char *new_locale[_VARIABLE_LC_MAX] = {};
_cleanup_(locale_free) char **dummy = new_locale;
char *new_locale[_VARIABLE_LC_MAX] = {}, **i;
_cleanup_(locale_free) _unused_ char **dummy = new_locale;
bool modified = false;
int interactive, p, r;
char **i;
assert(m);
assert(c);