[LTP] [PATCH 5/6] kernel/pt_test: Add missing string.h header
Petr Vorel
pvorel@suse.cz
Thu Oct 18 13:24:32 CEST 2018
Fixes implicit declaration of function warnings on older compilers:
pt_test.c: In function ‘intel_pt_pmu_value’:
pt_test.c:67:6: warning: implicit declaration of function ‘strstr’ [-Wimplicit-function-declaration]
if (strstr(value, delims) == NULL) {
^~~~~~
pt_test.c:67:6: warning: incompatible implicit declaration of built-in function ‘strstr’
pt_test.c:67:6: note: include ‘<string.h>’ or provide a declaration of ‘strstr’
pt_test.c:70:3: warning: implicit declaration of function ‘strsep’; did you mean ‘strlen’? [-Wimplicit-function-declaration]
strsep(&value, delims);
^~~~~~
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/tracing/pt_test/pt_test.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/tracing/pt_test/pt_test.c b/testcases/kernel/tracing/pt_test/pt_test.c
index abf575d37..fe5b1e914 100644
--- a/testcases/kernel/tracing/pt_test/pt_test.c
+++ b/testcases/kernel/tracing/pt_test/pt_test.c
@@ -18,6 +18,7 @@
#include <sched.h>
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include "tst_test.h"
#include "lapi/syscalls.h"
#include "config.h"
--
2.19.1
More information about the ltp
mailing list