fix(win): guard the pseudo-fs helpers so the MinGW leg builds warning-free
pseudo_fstype/pseudo_mountpoint are only reachable from the POSIX mount collectors; on _WIN32 they were dead code and -Wall -Wextra printed 'defined but not used'. Wrapped in #if !defined(_WIN32).
AuthorPico <picobot@scorpioplayer.com>
Date2026-11-11 06:49:53
Commit34c50c59
Parentse2c4e74f
Changed files
src/plugin_disks.c+4−0■■■■
1 file+4−0
Diff
src/plugin_disks.c+4−0■■■■
index ac27637..1493b81 100644
--- a/src/plugin_disks.c
+++ b/src/plugin_disks.c
@@ -265,6 +265,8 @@ typedef struct {
265265 int has_inodes;
266266 } mount_t;
267267
268+#if !defined(_WIN32)
269+
268270 /* Filesystems that report kernel-internal state rather than user storage. */
269271 static int pseudo_fstype(const char *fs)
270272 {
@@ -298,6 +300,8 @@ static int pseudo_mountpoint(const char *mp)
298300 return 0;
299301 }
300302
303+#endif /* !_WIN32 */
304+
301305 #if !defined(_WIN32)
302306
303307 /* /proc/mounts and /etc/mtab escape space, tab, newline and backslash as octal. */
304308
src/plugin_disks.c+4−0■■■■
index ac27637..1493b81 100644index ac27637..1493b81 100644
--- a/src/plugin_disks.c--- a/src/plugin_disks.c
+++ b/src/plugin_disks.c+++ b/src/plugin_disks.c
@@ -265,6 +265,8 @@ typedef struct {@@ -265,6 +265,8 @@ typedef struct {
265 int has_inodes;265 int has_inodes;
266 } mount_t;266 } mount_t;
267 267
268+#if !defined(_WIN32)
269+
268 /* Filesystems that report kernel-internal state rather than user storage. */270 /* Filesystems that report kernel-internal state rather than user storage. */
269 static int pseudo_fstype(const char *fs)271 static int pseudo_fstype(const char *fs)
270 {272 {
@@ -298,6 +300,8 @@ static int pseudo_mountpoint(const char *mp)@@ -298,6 +300,8 @@ static int pseudo_mountpoint(const char *mp)
298 return 0;300 return 0;
299 }301 }
300 302
303+#endif /* !_WIN32 */
304+
301 #if !defined(_WIN32)305 #if !defined(_WIN32)
302 306
303 /* /proc/mounts and /etc/mtab escape space, tab, newline and backslash as octal. */307 /* /proc/mounts and /etc/mtab escape space, tab, newline and backslash as octal. */
304308