diff --git a/libcpuid/libcpuid_util.c b/libcpuid/libcpuid_util.c index 57900f1..83bf1bd 100644 --- a/libcpuid/libcpuid_util.c +++ b/libcpuid/libcpuid_util.c @@ -58,6 +58,8 @@ libcpuid_warn_fn_t _warn_fun = default_warn; #endif void warnf(const char* format, ...) { + if (getenv("LIBCPUID_NO_WARN")) + return; char buff[1024]; va_list va; if (!_warn_fun) return; diff --git a/tests/run_tests.py b/tests/run_tests.py index 0b74048..5ce6915 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -5,6 +5,7 @@ import os, sys, re, random ### Constants: +os.environ["LIBCPUID_NO_WARN"] = "1" delimiter = "-" * 80 fields_x86 = [ "architecture", "feature-level", "purpose", "family", "model", "stepping", "extfamily", "extmodel", "cores", "logical",