-
Notifications
You must be signed in to change notification settings - Fork 301
Description
Building usrsctp for CMake with the generator "Visual Studio 17 2022", using C compiler MSVC 19.44.35217.0 has a few compiler errors. One is an actual error, the other two appear to be false positives.
These errors are not replicated when building with nmake.
Actual Errors:
usrsctplib/netinet/sctp_input.c:689
Trying to implicitly convert time_t to uint32_t. An explicit cast is required. sctp_heartbeat_info_param::time_value_1 is set in usrsctplib/netinet/sctp_output.c:12198 from a uint32_t, so the explicit cast here is arguably ok. If preferred, time_value_1 could be changed to be a uint32_t rather than a time_t.
Temporary fix
tv.tv_sec = (uint32_t)(cp->heartbeat.hb_info.time_value_1);
False Positives:
usrsctplib/netinet/sctp_output.c:13561 inp is uninitialized. Initializing to NULL resolves this.
usrsctplib/netinet/sctp_output.c:13564 asoc is uninitialized. Initializing to NULL resolves this.