add warning output

This commit is contained in:
Fancy Zhang
2020-07-04 15:33:02 +08:00
parent 4753d2be68
commit ab98bae840
2 changed files with 9 additions and 1 deletions

View File

@@ -49,6 +49,14 @@ extern bool enable_info;
fflush(stderr); \
}
#define warning(...) \
{ \
fprintf(stderr, "warning: "); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, "\n"); \
fflush(stderr); \
}
#define debug(...) \
if (enable_debug) { \
fprintf(stdout, "debug: "); \

View File

@@ -157,7 +157,7 @@ void Config::toRealProgramPath(vector<string> &v) {
auto rpath = getRealExistPath(p);
if (!rpath.empty()) tmp.push_back(rpath);
else
error("%s not exist or broken link", p.c_str());
warning("%s not exist or broken link", p.c_str());
}
v = tmp;
}