NVIDIAGameWorks/Falcor

(fmt->format.h) The following warning is treated as an error

bipul-mohanto opened this issue · 2 comments

Hi! Similar to the previous issue, I guess the fmt library is a problem with Visual Studio 2022. I tried to use the latest fmt library 11.0.2, lowered the warning level, and even disabled the error for warning, but no help. Here is my system:

  • Windows 10 (x64)
  • Visual Studio Community 2022, version 17.10.5
  • build mogwai as release is working fine, but debug build is returning errors:

p.s. the version: Falcor 6.0.

Severity	Code	Description	Project	File	Line	Suppression State	Details
Error	C2220	the following warning is treated as an error	Falcor	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	ToneMapper	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	Utils	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	TestPasses	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	TestPasses	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	SceneDebugger	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	SDFEditor	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	Utils	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	SVGFPass	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	SDFEditor	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	USDImporter	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	TAA	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	SimplePostFX	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	WhittedRayTracer	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	MinimalPathTracer	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	Utils	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	USDImporter	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	OptixDenoiser	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	Utils	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	TestPasses	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	OptixDenoiser	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	PixelInspectorPass	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	RTXDIPass	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	PBRTImporter	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	SDFEditor	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	PathTracer	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	ImageLoader	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	ErrorMeasurePass	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	PythonImporter	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	RenderPassTemplate	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	NRDPass	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	PBRTImporter	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	FLIPPass	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	USDImporter	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	ModulateIllumination	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	PBRTImporter	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	USDImporter	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	PBRTImporter	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	GBuffer	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	PBRTImporter	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	GBuffer	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	GBuffer	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	GBuffer	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	GBuffer	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	GBuffer	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	DebugPasses	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	DebugPasses	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	DebugPasses	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	DebugPasses	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	DebugPasses	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	DebugPasses	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	DLSSPass	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	DLSSPass	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	BlitPass	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	BSDFViewer	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	AssimpImporter	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	AccumulatePass	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	FalcorPython	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	Mogwai	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	Mogwai	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	Mogwai	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	Mogwai	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	Mogwai	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	Mogwai	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		
Error	C2220	the following warning is treated as an error	Mogwai	C:\Users\local-admin\Desktop\Falcor\external\fmt\include\fmt\format.h	559		

in the format.h -> template <typename T> using checked_ptr = stdext::checked_array_iterator<T*>;

Any suggestion?

The easiest (but hacky) solution I use is just to disable the problematic part of fmt which is using the checked_array_iterator.
For this I changed #if defined(_SECURE_SCL) && _SECURE_SCL [Line 557, format.h] to #if 0 so it uses the release checked_ptr.

@SirKero, excellent! It is working fine for now. 👍🏽