Fix: erroneous specifier used with ERR_FMT macro
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 25 Aug 2023 23:10:21 +0000 (19:10 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 22 Mar 2024 14:43:38 +0000 (10:43 -0400)
ERR_FMT uses fmtlib's specifiers rather than the POSIX ones.

Change-Id: Iadd914fe2f5556b4d2463a9a6861bcb4d40d9643
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/main.cpp
src/bin/lttng/lttng.cpp
tests/regression/tools/trigger/utils/notification-client.cpp
tests/unit/test_action.cpp

index 3e5d8eeeaca01791c742ca2d4c58fa3f733c14fb..bfd53e7e47041818996b55d9bb15266901688ebf 100644 (file)
@@ -1982,7 +1982,7 @@ int main(int argc, char **argv)
        try {
                return _main(argc, argv);
        } catch (const std::exception& e) {
-               ERR_FMT("Unhandled exception caught by main thread: %s", e.what());
+               ERR_FMT("Unhandled exception caught by main thread: {}", e.what());
                abort();
        }
 }
index 093a9809ccdfe512150f843356f58c0319a54ed6..48b02c6272687ed3d905ddc363c47d19d182e5b0 100644 (file)
@@ -490,7 +490,7 @@ int main(int argc, char **argv)
        try {
                return _main(argc, argv);
        } catch (const std::exception& e) {
-               ERR_FMT("Unhandled exception caught by client: %s", e.what());
+               ERR_FMT("Unhandled exception caught by client: {}", e.what());
                abort();
        }
 }
index 58ac01e6cbb078d688fb811aa22991c9e3bf1a12..27bd100c694fbd567e8a5b6e055b317f583b3c53 100644 (file)
@@ -287,7 +287,7 @@ int main(int argc, char **argv)
        try {
                return _main(argc, argv);
        } catch (const std::exception& e) {
-               ERR_FMT("Unhandled exception caught by notification client: %s", e.what());
+               ERR_FMT("Unhandled exception caught by notification client: {}", e.what());
                abort();
        }
 }
index c46b8fcea665fa177dbaa27c8b85a7027bec5096..52f6d26ca66a70799db00cd135d90478d9b3a52a 100644 (file)
@@ -559,7 +559,7 @@ int main()
        try {
                return _main();
        } catch (const std::exception& e) {
-               ERR_FMT("Unhandled exception caught by action unit test: %s", e.what());
+               ERR_FMT("Unhandled exception caught by action unit test: {}", e.what());
                abort();
        }
 }
This page took 0.028125 seconds and 4 git commands to generate.