* 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:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user