Message ID | B061C354-AC5B-4B73-91B5-BB24501A60D7@siemens.com |
---|---|
State | Accepted |
Headers | show |
Series | util: Fix swupdate_{mount,umount} warnings for other OSes | expand |
On 27.10.23 11:01, 'Storm, Christian' via swupdate wrote: > Fix unused variable warnings for other OSes than Linux > and FreeBSD, e.g., macOS. > > Signed-off-by: Christian Storm <christian.storm@siemens.com> > --- > core/util.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/core/util.c b/core/util.c > index f8223d73..a6efb417 100644 > --- a/core/util.c > +++ b/core/util.c > @@ -759,6 +759,9 @@ int swupdate_mount(const char *device, const char *dir, const char *fstype) > iov[7].iov_len = strlen(errmsg) + 1; > return nmount(iov, iovlen, mntflags); > #else > + (void)device; > + (void)dir; > + (void)fstype; > /* Not implemented for this OS, no specific errno. */ > errno = 0; > return -1; > @@ -773,6 +776,7 @@ int swupdate_umount(const char *dir) > int mntflags = 0; > return unmount(dir, mntflags); > #else > + (void)dir; > /* Not implemented for this OS, no specific errno. */ > errno = 0; > return -1; Acked-by: Stefano Babic <stefano.babic@swupdate.org> By the way, do you have a valid configuration to test apart Linux ? I confess I ran on FreeBSD some years ago (probably on 11.x), never done later. I am just thinking about how to run a sort of CI from gitlab, at least the build, if it does not require a lot of effort. Best regards, Stefano
Hi Stefano,
> By the way, do you have a valid configuration to test apart Linux ? I confess I ran on FreeBSD some years ago (probably on 11.x), never done later. I am just thinking about how to run a sort of CI from gitlab, at least the build, if it does not require a lot of effort.
Hm, that I don't know, but that definitely helps in catching those "simple" errors...
I do have a current FreeBSD VM which I use from time to time, perfectly suited for SWUpdate tests :)
That reminds me that I still have to test Dominique's "[PATCH 1/2] prepare_ipc: set client fd as CLOEXEC" on FreeBSD but sadly didn't find time since.
However, I do have more regular access to a macOS machine which isn't too different from a FreeBSD one, except where it is :)
So, I plan to keep a closer look on "other OSes" and send patches for them when time permits.
Kind regards,
Christian
diff --git a/core/util.c b/core/util.c index f8223d73..a6efb417 100644 --- a/core/util.c +++ b/core/util.c @@ -759,6 +759,9 @@ int swupdate_mount(const char *device, const char *dir, const char *fstype) iov[7].iov_len = strlen(errmsg) + 1; return nmount(iov, iovlen, mntflags); #else + (void)device; + (void)dir; + (void)fstype; /* Not implemented for this OS, no specific errno. */ errno = 0; return -1; @@ -773,6 +776,7 @@ int swupdate_umount(const char *dir) int mntflags = 0; return unmount(dir, mntflags); #else + (void)dir; /* Not implemented for this OS, no specific errno. */ errno = 0; return -1;
Fix unused variable warnings for other OSes than Linux and FreeBSD, e.g., macOS. Signed-off-by: Christian Storm <christian.storm@siemens.com> --- core/util.c | 4 ++++ 1 file changed, 4 insertions(+)