]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: cast ignored retval of deserialize_* to void
authorMike Yuan <me@yhndnzj.com>
Mon, 17 Jun 2024 05:21:43 +0000 (07:21 +0200)
committerMike Yuan <me@yhndnzj.com>
Mon, 17 Jun 2024 14:56:19 +0000 (16:56 +0200)
Fixes CID#1547098

src/core/service.c
src/core/socket.c

index 1e26a4436466f0cbffb9329d63bfdc249779e8f7..92ce26c234cf19bd90ed1aa46b19b60006b953f3 100644 (file)
@@ -3286,11 +3286,11 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value,
                 else
                         s->main_exec_status.status = i;
         } else if (streq(key, "main-exec-status-start"))
-                deserialize_dual_timestamp(value, &s->main_exec_status.start_timestamp);
+                (void) deserialize_dual_timestamp(value, &s->main_exec_status.start_timestamp);
         else if (streq(key, "main-exec-status-exit"))
-                deserialize_dual_timestamp(value, &s->main_exec_status.exit_timestamp);
+                (void) deserialize_dual_timestamp(value, &s->main_exec_status.exit_timestamp);
         else if (streq(key, "main-exec-status-handoff"))
-                deserialize_dual_timestamp(value, &s->main_exec_status.handoff_timestamp);
+                (void) deserialize_dual_timestamp(value, &s->main_exec_status.handoff_timestamp);
         else if (STR_IN_SET(key, "main-command", "control-command")) {
                 r = service_deserialize_exec_command(u, key, value);
                 if (r < 0)
@@ -3371,15 +3371,15 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value,
                         s->status_errno = i;
 
         } else if (streq(key, "watchdog-timestamp"))
-                deserialize_dual_timestamp(value, &s->watchdog_timestamp);
+                (void) deserialize_dual_timestamp(value, &s->watchdog_timestamp);
         else if (streq(key, "watchdog-original-usec"))
-                deserialize_usec(value, &s->watchdog_original_usec);
+                (void) deserialize_usec(value, &s->watchdog_original_usec);
         else if (streq(key, "watchdog-override-usec")) {
                 if (deserialize_usec(value, &s->watchdog_override_usec) >= 0)
                         s->watchdog_override_enable = true;
 
         } else if (streq(key, "reload-begin-usec"))
-                deserialize_usec(value, &s->reload_begin_usec);
+                (void) deserialize_usec(value, &s->reload_begin_usec);
         else
                 log_unit_debug(u, "Unknown serialization key: %s", key);
 
index 4be308265a714e5cfcb8721611e54245b6e9ab6e..63c4c1a7aa6fce09999407b1b780ed9413496403 100644 (file)
@@ -2823,8 +2823,7 @@ static int socket_deserialize_item(Unit *u, const char *key, const char *value,
                         log_unit_debug(u, "No matching ffs socket found: %s", value);
 
         } else if (streq(key, "trigger-ratelimit"))
-                deserialize_ratelimit(&s->trigger_limit, key, value);
-
+                (void) deserialize_ratelimit(&s->trigger_limit, key, value);
         else
                 log_unit_debug(UNIT(s), "Unknown serialization key: %s", key);