aboutsummaryrefslogtreecommitdiff
path: root/src/libmain/shared.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-07-14 22:43:50 +0200
committereldritch horrors <pennae@lix.systems>2024-07-20 12:33:49 +0000
commitd8c09b583644105c25e3023e98ffceb75333af2e (patch)
treea64b06c54d449a9778766bf15c45e717615b211f /src/libmain/shared.cc
parent22252825c4ea5e8a60eea419ebe352cab184e8b6 (diff)
libutil: remove warnOnce macro
it's only used once, and even that one use is highly questionable. more instances of warnOnce should be much more principled than this has been Change-Id: I5856570c99cb44462e700d753d0c706a5db03c4b
Diffstat (limited to 'src/libmain/shared.cc')
-rw-r--r--src/libmain/shared.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index af7f46d87..a407c647f 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -33,9 +33,13 @@ void printGCWarning()
{
if (!gcWarning) return;
static bool haveWarned = false;
- warnOnce(haveWarned,
- "you did not specify '--add-root'; "
- "the result might be removed by the garbage collector");
+ if (!haveWarned) {
+ haveWarned = true;
+ warn(
+ "you did not specify '--add-root'; "
+ "the result might be removed by the garbage collector"
+ );
+ }
}