Change memcpy() calls to assignments
authorAlexey Neyman <aneyman@google.com>
Thu, 5 Oct 2023 18:43:17 +0000 (18:43 +0000)
committerAlexey Neyman <aneyman@google.com>
Thu, 5 Oct 2023 18:45:43 +0000 (18:45 +0000)
This is to avoid triggering a spurious warning caused by [1], which
is triggered by the next commit in chain (unrelated change in
update_io_tick_disk()).

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111696

Signed-off-by: Alexey Neyman <aneyman@google.com>
diskutil.c

index cf4ede85773b09082406229a5eebc473e2e49945..40f2c260308aafece4128b9aca21c1abc175b0ad 100644 (file)
@@ -103,8 +103,8 @@ static void update_io_tick_disk(struct disk_util *du)
 
        fio_gettime(&t, NULL);
        dus->s.msec += mtime_since(&du->time, &t);
-       memcpy(&du->time, &t, sizeof(t));
-       memcpy(&ldus->s, &__dus.s, sizeof(__dus.s));
+       du->time = t;
+       ldus->s = __dus.s;
 }
 
 int update_io_ticks(void)