mirror of
https://github.com/systemd/systemd.git
synced 2025-01-20 18:04:03 +03:00
Merge pull request #10394 from yuwata/fixes-found-by-clang
Fix warnings reported by clang
This commit is contained in:
commit
ca193035e9
@ -1592,7 +1592,7 @@ finish:
|
||||
}
|
||||
|
||||
static int json_transform_variant(sd_bus_message *m, const char *contents, JsonVariant **ret) {
|
||||
_cleanup_(json_variant_unrefp) JsonVariant *type = NULL, *value = NULL;
|
||||
_cleanup_(json_variant_unrefp) JsonVariant *value = NULL;
|
||||
int r;
|
||||
|
||||
assert(m);
|
||||
|
@ -3096,7 +3096,7 @@ int manager_serialize(
|
||||
assert(f);
|
||||
assert(fds);
|
||||
|
||||
_cleanup_(manager_reloading_stopp) Manager *reloading = manager_reloading_start(m);
|
||||
_cleanup_(manager_reloading_stopp) _unused_ Manager *reloading = manager_reloading_start(m);
|
||||
|
||||
fprintf(f, "current-job-id=%"PRIu32"\n", m->current_job_id);
|
||||
fprintf(f, "n-installed-jobs=%u\n", m->n_installed_jobs);
|
||||
@ -3217,7 +3217,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
|
||||
/* If we are not in reload mode yet, enter it now. Not that this is recursive, a caller might already have
|
||||
* increased it to non-zero, which is why we just increase it by one here and down again at the end of this
|
||||
* call. */
|
||||
_cleanup_(manager_reloading_stopp) Manager *reloading = manager_reloading_start(m);
|
||||
_cleanup_(manager_reloading_stopp) _unused_ Manager *reloading = manager_reloading_start(m);
|
||||
|
||||
for (;;) {
|
||||
char line[LINE_MAX];
|
||||
|
@ -208,7 +208,7 @@ static void test_2(JsonVariant *v) {
|
||||
|
||||
/* has thisisaverylongproperty */
|
||||
p = json_variant_by_key(v, "thisisaverylongproperty");
|
||||
assert_se(p && json_variant_type(p) == JSON_VARIANT_REAL && fabs(json_variant_real(p) - 1.27) < 0.001);
|
||||
assert_se(p && json_variant_type(p) == JSON_VARIANT_REAL && fabsl(json_variant_real(p) - 1.27) < 0.001);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user