Description

It has been reported that when building with Visual Studio 2017 version 15.5.1, a warning/compile error is shown in BodyInstanceCustomization.cpp: warning C4287: '<': unsigned/negative constant mismatch

In the destructor for FUpdateCollisionResponseHelper, there is a check that is making sure that an unsigned variable is not less than -1, which may never fire. I also noticed that there is a const variable that is created in the destructor that does not appear to be used.

The compile warning may not appear in Visual Studio 2015. I was only able to see it in Visual Studio 2017.

REGRESSION:
No. This code appears to be unchanged from 4.16. The code appears to have been added in CL 2931763.

Steps to Reproduce
  1. Open the BodyInstanceCustomization.cpp file.
  2. Locate the FUpdateCollisionResponseHelper struct.
  3. Look at the struct's destructor.

RESULT:
The check may never fire since an unsigned value is being checked to see if it is less than -1 (warning C4287: '<': unsigned/negative constant mismatch). It also appears that the const ProeprtyOffset32 that is created is never used.

EXPECTED:
The check is removed or reworked to do a valid comparison. The creation of ProeprtyOffset32 is removed, or the variable is used (it may be intended to be passed into the call to PropagateDefaultValueChange()).

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-53507 in the post.

0
Login to Vote

Fixed
ComponentUE - Simulation - Physics
Affects Versions4.17.24.194.20
Target Fix4.20
Fix Commit3969598
Main Commit4109103
Release Commit4095966
CreatedDec 15, 2017
ResolvedApr 30, 2018
UpdatedJun 23, 2018
View Jira Issue