summaryrefslogtreecommitdiffstats
path: root/fastos/src/tests/threadtest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fastos/src/tests/threadtest.cpp')
-rw-r--r--fastos/src/tests/threadtest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/fastos/src/tests/threadtest.cpp b/fastos/src/tests/threadtest.cpp
index de1e15de2b3..968779019cb 100644
--- a/fastos/src/tests/threadtest.cpp
+++ b/fastos/src/tests/threadtest.cpp
@@ -28,6 +28,9 @@ class ThreadTest : public ThreadTestBase
for (i=0; i<MAX_THREADS+1; i++) {
jobs[i].code = WAIT_FOR_BREAK_FLAG;
jobs[i].message = static_cast<char *>(malloc(100));
+ if (jobs[i].message == nullptr) {
+ abort(); // GCC may infer that a potentially null ptr is passed to sprintf
+ }
sprintf(jobs[i].message, "Thread %d invocation", i+1);
}