SpartanJ / efsw

efsw is a C++ cross-platform file system watcher and notifier.
Other
645 stars 98 forks source link

fix/macos path handling #169

Closed solarispika closed 10 months ago

solarispika commented 10 months ago
SpartanJ commented 10 months ago

BTW, there is also a warning when compile with debug config on macOS.

/Users/user/Programming/efsw/src/efsw/WatcherKqueue.cpp:439:14: warning: variable 's_fc' set but not used [-Wunused-but-set-variable]
        static long s_fc = 0;
                    ^
1 warning generated.

I am not sure how to fix it in a neat cross platform way without using C++17 [[maybe_unused]] attribute.

Feel free to remove s_fc all-together, simply change the debug message from:

            efDEBUG( "Started using WatcherGeneric, reached file descriptors limit: %ld. Folders "
                     "added: %ld\n",
                     mWatcher->mFileDescriptorCount, s_fc );

to

            efDEBUG( "Started using WatcherGeneric, reached file descriptors limit: %ld.",
                     mWatcher->mFileDescriptorCount );