The branch main has been updated by rlibby:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=430be7e1ee71902acb872544c928c19dd23c87ae

commit 430be7e1ee71902acb872544c928c19dd23c87ae
Author:     Ryan Libby <[email protected]>
AuthorDate: 2024-07-09 18:43:57 +0000
Commit:     Ryan Libby <[email protected]>
CommitDate: 2024-07-09 18:43:57 +0000

    sx: avoid gcc -Wunused-value
    
    Also fixup whitespace while touching these lines.
    
    Reported by:    GCC -Wunused-value
    Discussed with: imp
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D45875
---
 sys/sys/sx.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/sys/sx.h b/sys/sys/sx.h
index 798e85ed67dc..deb277decc75 100644
--- a/sys/sys/sx.h
+++ b/sys/sys/sx.h
@@ -301,12 +301,12 @@ __sx_xunlock(struct sx *sx, struct thread *td, const char 
*file, int line)
 
 #ifdef _STANDALONE
 /* since we have no threads in the boot loader, trivially implement no-op 
version */
-#define sx_xlock(s) (1)
-#define sx_try_xlock(s) (1)
-#define sx_xunlock(s) (1)
-#define SX_DUPOK 0
-#define SX_NEW 0
-#define SX_NOWITNESS 0
+#define        sx_xlock(s)     do {} while (0)
+#define        sx_try_xlock(s) (1)
+#define        sx_xunlock(s)   do {} while (0)
+#define        SX_DUPOK        0
+#define        SX_NEW          0
+#define        SX_NOWITNESS    0
 
 static __inline void
 sx_init_flags(struct sx *sx, const char *description, int opts)

Reply via email to