UnrealEngine failed to build due to error C4800: Implicit conversion from 'int32' to bool. Possible information loss on x64 with MSVC

I’m going to post Sarlack’s comment as an answer because I’m sure that is the correct answer. Essentially, you have to suppress these compiler warnings by going into the VCToolChain.cs file located at the file path, Engine\Source\Programs\UnrealBuildTool\Platform\Windows. And after line 484, just add these two lines,

Arguments.Add("/wd4800");

Arguments.Add("/wd5038");

c4800 is the code for the compiler warning,

Implicit conversion from ‘type’ to bool. Possible information loss

c5038 is the code for the compiler warning,

data member ‘member1’ will be initialized after data member ‘member2’ data member ‘member’ will be initialized after base class ‘base_class’

UPDATE

This will be resolved in 4.22.1. https://github.com/EpicGames/UnrealEngine/pull/5752