* globals.cc (dos_file_warning): Set to false by default.

* path.cc (warn_msdos): Make static.  Drop test for dos_file_warning.
	(path_conv::check): Check for dos_file_warning here to avoid a function
	call in the default case.
This commit is contained in:
Corinna Vinschen
2014-10-28 10:44:49 +00:00
parent 09687ee963
commit e6a4318d78
4 changed files with 13 additions and 4 deletions

View File

@@ -517,10 +517,10 @@ path_conv::get_wide_win32_path (PWCHAR wc)
return wc;
}
void
static void
warn_msdos (const char *src)
{
if (user_shared->warned_msdos || !dos_file_warning || !cygwin_finished_initializing)
if (user_shared->warned_msdos || !cygwin_finished_initializing)
return;
tmp_pathbuf tp;
char *posix_path = tp.c_get ();
@@ -1202,7 +1202,7 @@ path_conv::check (const char *src, unsigned opt,
if (tail < path_end && tail > path_copy + 1)
*tail = '/';
set_normalized_path (path_copy);
if (is_msdos && !(opt & PC_NOWARN))
if (is_msdos && dos_file_warning && !(opt & PC_NOWARN))
warn_msdos (src);
}