diff options
Diffstat (limited to 'src/libmain')
-rw-r--r-- | src/libmain/shared.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 2441cbf013..71be0dd5d0 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -44,13 +44,10 @@ Path makeRootName(const Path & gcRoot, int & counter) void printGCWarning() { - static bool warned = false; - if (!warned) { - printMsg(lvlInfo, - "warning: you did not specify `--add-root'; " - "the result might be removed by the garbage collector"); - warned = true; - } + static bool haveWarned = false; + warnOnce(haveWarned, + "warning: you did not specify `--add-root'; " + "the result might be removed by the garbage collector"); } |