[PATCH] testsuite: avoid standard includes in the tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These headers are often complex and full of implementation
specificities. They have no place in the testsuite.

So, remove these includes and replace them by the prototype
of the function being used.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 validation/backend/hello.c | 2 +-
 validation/backend/sum.c   | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/validation/backend/hello.c b/validation/backend/hello.c
index b0e514be4..eb89846f0 100644
--- a/validation/backend/hello.c
+++ b/validation/backend/hello.c
@@ -1,4 +1,4 @@
-#include <stdio.h>
+int puts(const char *s);
 
 int main(int argc, char *argv[])
 {
diff --git a/validation/backend/sum.c b/validation/backend/sum.c
index fa51120e1..38ebf41ed 100644
--- a/validation/backend/sum.c
+++ b/validation/backend/sum.c
@@ -1,5 +1,4 @@
-#include <stdio.h>
-#include <stdlib.h>
+int printf(const char * fmt, ...);
 
 static int sum(int n)
 {
-- 
2.24.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux