这个函数的去警告改写,可以是这样:(查看汇编,编译器就是这样改写的) char *_path_(char *copy, char *pn) // to intercept d:\path\ from pathname { char *s =copy; int l = 0; strcpy(copy, pn); for(; *s; s++) if(*s == '\\') l++; if(!l) return ""; for(; *(--s) != '\\';) *s = '\0'; // to delete backward till '\', remain the last '\' s= copy; return s; // This is the only place where GCC/MinGW64 8.x with -Wall gives a warning. }