Commit 96acbaec authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Initialize variable.

* The actual value is only relevant when ioMode != PIO_NONE.
parent ee566da9
......@@ -972,7 +972,8 @@ cdiPioStreamCDFOpenWrap(const char *filename, const char *filemode,
case FILETYPE_NC4:
case FILETYPE_NC4C:
{
int rank, fileID;
/* Only needs initialization to shut up gcc */
int rank = -1, fileID;
int ioMode = commInqIOMode();
if (ioMode == PIO_NONE
|| commInqRankColl() == (rank = cdiPioNextOpenRank()))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment