Commit c8e8669a authored by Uwe Schulzweida's avatar Uwe Schulzweida

fix xlc compiler warning

parent 9c952061
......@@ -964,12 +964,12 @@ const char *filetypeext(int filetype)
{
switch ( filetype )
{
case FILETYPE_GRB: return (".grb"); break;
case FILETYPE_GRB2: return (".grb2"); break;
case FILETYPE_NC: return (".nc"); break;
case FILETYPE_NC2: return (".nc2"); break;
case FILETYPE_NC4: return (".nc4"); break;
case FILETYPE_NC4C: return (".nc4c"); break;
case FILETYPE_GRB:
case FILETYPE_GRB2: return (".grb"); break;
case FILETYPE_NC:
case FILETYPE_NC2:
case FILETYPE_NC4:
case FILETYPE_NC4C: return (".nc"); break;
case FILETYPE_SRV: return (".srv"); break;
case FILETYPE_EXT: return (".ext"); break;
case FILETYPE_IEG: return (".ieg"); break;
......@@ -1199,7 +1199,7 @@ void *Gradsdes(void *argument)
/* ctl file name */
strcpy(ctlfile, cdoStreamName(0)->args);
repl_filetypeext(&ctlfile, filetypeext(filetype), ".ctl");
repl_filetypeext(ctlfile, filetypeext(filetype), ".ctl");
/* open ctl file*/
gdp = fopen(ctlfile, "w");
......
......@@ -323,11 +323,27 @@ const char *processInqPrompt(void)
}
#if defined(HAVE_GLOB_H)
static
int get_glob_flags(void)
{
int glob_flags = 0;
#if defined (GLOB_NOCHECK)
glob_flags |= GLOB_NOCHECK;
#endif
#if defined (GLOB_TILDE)
glob_flags |= GLOB_TILDE;
#endif
return (glob_flags);
}
/* Convert a wildcard pattern into a list of blank-separated filenames which match the wildcard. */
static
argument_t *glob_pattern(const char *restrict wildcard)
{
size_t cnt, length = 0;
int glob_flags = GLOB_NOCHECK | GLOB_TILDE;
int glob_flags = get_glob_flags();
glob_t glob_results;
char **p;
argument_t *argument = NULL;
......@@ -568,7 +584,7 @@ char *expand_filename(const char *string)
if ( find_wildcard(string, strlen(string)) )
{
#if defined(HAVE_GLOB_H)
int glob_flags = GLOB_NOCHECK | GLOB_TILDE;
int glob_flags = get_glob_flags();
glob_t glob_results;
glob(string, glob_flags, 0, &glob_results);
......
Markdown is supported
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