filesystem icon indicating copy to clipboard operation
filesystem copied to clipboard

VS2022 MSVC with `/W4` causes `warning C4127: conditional expression is constant`

Open GXTX opened this issue 3 years ago • 1 comments

Describe the bug gulfs @ cd6805e

include\ghc/filesystem.hpp(2278,1): warning C4127: conditional expression is constant
include\ghc/filesystem.hpp(2336): message : see reference to function template instantiation 'ghc::filesystem::file_status ghc::filesystem::detail::status_from_INFO<WIN32_FILE_ATTRIBUTE_
DATA>(const ghc::filesystem::path &,const INFO *,std::error_code &,uintmax_t *,time_t *)' being compiled [YACardEmu.vcxproj]
          with
          [
              INFO=WIN32_FILE_ATTRIBUTE_DATA
          ]

To Reproduce Compile an application using this with MSVC and /W4 warning level.

Expected behavior Not warn.

Additional context Is it possible to "fix" this or would it be considered a not fix?

GXTX avatar May 27 '22 17:05 GXTX

Thx for the report, I'll look into it.

gulrak avatar Jun 14 '22 16:06 gulrak

The symlink detection was not good anyway and is changed in a way that the offending source line doesn't exist anymore.

gulrak avatar Mar 05 '23 10:03 gulrak