coin-or / Cgl

Cut Generator Library
Other
24 stars 14 forks source link

Cgl build fails on VS 2019 'uninitialized saveFColUpper' #82

Closed jhmgoossens closed 1 year ago

jhmgoossens commented 1 year ago

Since commit 7766660, my VS 2019 builds of Cgl fail with the error Cgl\src\CglProbing\CglProbing.cpp(5391): error C4703: potentially uninitialized local pointer variable 'saveFColUpper' used Cgl\src\CglProbing\CglProbing.cpp(5392): error C4703: potentially uninitialized local pointer variable 'saveFRowLower' used Cgl\src\CglProbing\CglProbing.cpp(5393): error C4703: potentially uninitialized local pointer variable 'saveFRowUpper' used Moving to the previous commit removes these.

Is there some truth in this "uninitialized local pointer" issue? By the above removing of the define for FIXED_BOTH_WAYS, some initialization code is maybe no longer called, triggering this potential issue?

There are also two occurrences of "FIXED_BOTH_WAY" without "S" in the CglProbing.cpp. Are these typos? But anyway, these are older.

Of course, I could remove the build flag /sdl for Additional Security Checks (which treats C4703 as Error) that has always been part of the VS 2019 setting for Cgl. But only if this can be confirmed to be a non-issue. Many thanks for your help!

jjhforrest commented 1 year ago

Thanks for pointing out missing S. Fixed and added =NULL s for good luck

jhmgoossens commented 1 year ago

Thanks, those did the trick