Skip to content

Assorted compiler warnings cleanup

Alan Coopersmith requested to merge alanc/libxtrans:misc into master

Cleans up a bunch of compiler & static analysis warnings from gcc 14.1:

  • LocalInitTransports: Fix -Wuseless-cast warning for getenv() call
  • SocketCreateListener: Fix -Wuseless-cast warning in bind() call
  • Clear numerous -Wsign-compare warnings from gcc 14.1
  • SocketINETConnect: return failure when malloc() fails
  • ParseAddress: return failure when strdup() fails
  • MakeAllCOTSServerListeners: Initialize temp_ciptrs
  • GetMyNetworkId: Avoid writing to NULL pointer if malloc() fails
  • GetPeerNetworkId: Avoid writing to NULL pointer if malloc() fails
  • GetPeerNetworkId: avoid calling strlen() on a NULL pointer
  • SocketOpen: avoid leak of out-of-range fd
  • is_numeric: Add TRANS_SERVER to required ifdefs

Merge request reports

Loading