Skip to contentSkip to conversation

Check fallthrough in mount.h for Mac

PATCH New Jaegeuk Kim 1 participant 1 message May 26, 2022 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Check fallthrough in mount.h for Mac

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/os/base.h:128:23: error: missing ')' after 'do'

                      ^~~~~~~~~~~
external/f2fs-tools/include/f2fs_fs.h:81:24: note: expanded from macro 'fallthrough'
                    ~~ ^

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/os/base.h:128:22: note: to match this '('

---
 include/f2fs_fs.h | 6 ++++++
 lib/libf2fs.c     | 3 ---
 2 files changed, 6 insertions(+), 3 deletions(-)
include/f2fs_fs.h +6 -0
index ad2798cf388c..21a7e70d952d 100644
@@ -77,11 +77,17 @@
 #define static_assert _Static_assert
 #endif
 
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+
+#ifndef fallthrough
 #ifdef __clang__
 #define fallthrough do {} while (0) /* fall through */
 #else
 #define fallthrough __attribute__((__fallthrough__))
 #endif
+#endif
 
 #ifdef _WIN32
 #undef HAVE_LINUX_TYPES_H
lib/libf2fs.c +0 -3
index 36b8c25980ab..ecaa2e9d1ad5 100644
@@ -22,9 +22,6 @@
 #endif
 #include <time.h>
 #include <sys/stat.h>
-#ifdef HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
-#endif
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
Signature · 8 lines
2.36.1.124.g0e6072fb45-goog



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel