From: Martin Quinson Date: Sun, 26 Aug 2018 11:30:15 +0000 (+0200) Subject: some compilers cannot see that this value is initialized in all cases X-Git-Tag: v3_21~158 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6dd9ac3c915f00f23fb07005516f051f7ce9cb8f?hp=5be17ba45c34a0f49c0394c3713f3836ec110f5e some compilers cannot see that this value is initialized in all cases --- diff --git a/src/simix/smx_network.cpp b/src/simix/smx_network.cpp index 12d744c9c7..06f3d27c10 100644 --- a/src/simix/smx_network.cpp +++ b/src/simix/smx_network.cpp @@ -587,7 +587,7 @@ void SIMIX_comm_finish(smx_activity_t synchro) if (simcall->issuer->exception && (simcall->call == SIMCALL_COMM_WAITANY || simcall->call == SIMCALL_COMM_TESTANY)) { // First retrieve the rank of our failing synchro - int rank; + int rank = -1; if (simcall->call == SIMCALL_COMM_WAITANY) { rank = xbt_dynar_search(simcall_comm_waitany__get__comms(simcall), &synchro); } else if (simcall->call == SIMCALL_COMM_TESTANY) {