From 4b3d7ff7216dfdb1708cc8ad1b267186440eac11 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 5 Oct 2023 18:43:17 +0000 Subject: [PATCH] Change memcpy() calls to assignments 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 --- diskutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diskutil.c b/diskutil.c index cf4ede85..40f2c260 100644 --- a/diskutil.c +++ b/diskutil.c @@ -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) -- 2.25.1