SWIFTSIM / SWIFT

Modern astrophysics and cosmology particle-based code. Mirror of gitlab developments at https://gitlab.cosma.dur.ac.uk/swift/swiftsim
http://www.swiftsim.com
GNU Lesser General Public License v3.0
88 stars 58 forks source link

Uninitialised pointer in src/proxy.c? #6

Closed PhilRid closed 5 years ago

PhilRid commented 5 years ago

Hi,

I was just trying to build with a Clang based compiler and noticed the following

proxy.c:111:7: error: variable 'cids_in' is used uninitialized whenever '||' condition is true [-Werror,-Wsometimes-uninitialized]
  if ((reqs_in = (MPI_Request *)malloc(sizeof(MPI_Request) *

In src/proxy.c, initialising the pointer cids_in fixes it, i.e.

int *cids_in=NULL;

Thanks.

JBorrow commented 5 years ago

Thanks for the report! We actually fixed this issue yesterday. Updating to the latest master (from the GitLab, not the GitHub mirror) should fix this.

pwdraper commented 5 years ago

This github mirror is updated each (UK) night, so any changes from yesterday will be pushed to master.