Commit 222fce89 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Declare variable only when used.

parent a5cb1e32
...@@ -33,6 +33,7 @@ static const struct model_config default_setup ...@@ -33,6 +33,7 @@ static const struct model_config default_setup
.max_nlev = 5, .max_nlev = 5,
}; };
#ifdef USE_MPI
static const struct { static const struct {
char *text; char *text;
int mode; int mode;
...@@ -42,6 +43,7 @@ static const struct { ...@@ -42,6 +43,7 @@ static const struct {
{ "PIO_ASYNCH", PIO_ASYNCH }, { "PIO_ASYNCH", PIO_ASYNCH },
{ "PIO_WRITER", PIO_WRITER } { "PIO_WRITER", PIO_WRITER }
}; };
#endif
static const struct { static const struct {
char suffix[4]; char suffix[4];
...@@ -74,6 +76,7 @@ parse_intarg(const char msg[]) ...@@ -74,6 +76,7 @@ parse_intarg(const char msg[])
return (int)temp; return (int)temp;
} }
#ifdef USE_MPI
static inline int static inline int
search_iomode_str(const char *modestr) search_iomode_str(const char *modestr)
{ {
...@@ -88,6 +91,7 @@ search_iomode_str(const char *modestr) ...@@ -88,6 +91,7 @@ search_iomode_str(const char *modestr)
} }
return retval; return retval;
} }
#endif
int main (int argc, char *argv[]) int main (int argc, char *argv[])
{ {
......
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