diff --git a/src/common.h b/src/common.h index cf18383..f2ddab9 100644 --- a/src/common.h +++ b/src/common.h @@ -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: "); \ diff --git a/src/config.cpp b/src/config.cpp index 9641732..2de0050 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -157,7 +157,7 @@ void Config::toRealProgramPath(vector &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; }