On Wed, Feb 12, 2025 at 03:30:21PM +0000, Daniel P. Berrangé wrote: > > diff --git a/include/system/os-win32.h b/include/system/os-win32.h > > index b82a5d3ad9..cd61d69e10 100644 > > --- a/include/system/os-win32.h > > +++ b/include/system/os-win32.h > > @@ -123,8 +123,9 @@ static inline bool is_daemonized(void) > > return false; > > } > > > > -static inline int os_mlock(void) > > +static inline int os_mlock(bool on_fault) > > { > > + (void)on_fault; > > Is this really needed ? Our compiler flags don't enable warnings > about unused variables. > > If they did, this would not be the way to hide them. Instead you > would use the "G_GNUC_UNUSED" annotation against the parameter. > eg > > static inline int os_mlock(bool on_fault G_GNUC_UNUSED)
To be on the safe side.. I'll try to keep the marker if no one disagrees. So that's: diff --git a/include/system/os-win32.h b/include/system/os-win32.h index cd61d69e10..bc623061d8 100644 --- a/include/system/os-win32.h +++ b/include/system/os-win32.h @@ -123,9 +123,8 @@ static inline bool is_daemonized(void) return false; } -static inline int os_mlock(bool on_fault) +static inline int os_mlock(bool on_fault G_GNUC_UNUSED) { - (void)on_fault; return -ENOSYS; } > > > return -ENOSYS; > > } -- Peter Xu