]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
lib/vfscore: Remove timeval-related build warnings
authorTiago Andre Goncalves Oliveira <t.g.oliveira@ua.pt>
Sat, 16 Sep 2023 17:02:38 +0000 (18:02 +0100)
committerRazvan Deaconescu <razvand@unikraft.io>
Fri, 20 Oct 2023 16:32:28 +0000 (19:32 +0300)
The futimes and lutimes functions are defined with a `struct timeval [2]`
argument. They are however instantiated with a pointer. This causes a build
warning.

Change the instantiation from pointer to array. This removes the build warning.

Signed-off-by: Tiago Andre Goncalves Oliveira <t.g.oliveira@ua.pt>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1099

lib/vfscore/main.c

index 2a0d6c264664b3aaae4d108c8f64a766d4a8db98..c62e05ea9efefd8028030a50f8b598d27794208a 100644 (file)
@@ -2550,7 +2550,7 @@ UK_TRACEPOINT(trace_vfs_utimes, "\"%s\"", const char*);
 UK_TRACEPOINT(trace_vfs_utimes_ret, "");
 UK_TRACEPOINT(trace_vfs_utimes_err, "%d", int);
 
-int futimes(int fd, const struct timeval *times)
+int futimes(int fd, const struct timeval times[2])
 {
     return futimesat(fd, NULL, times);
 }
@@ -2688,7 +2688,7 @@ UK_SYSCALL_R_DEFINE(int, utimes, const char*, pathname,
        return do_utimes(pathname, times, 0);
 }
 
-int lutimes(const char *pathname, const struct timeval *times)
+int lutimes(const char *pathname, const struct timeval times[2])
 {
        return do_utimes(pathname, times, AT_SYMLINK_NOFOLLOW);
 }