summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2024-05-27 11:20:07 +0200
committerElyes Haouas <ehaouas@noos.fr>2024-05-29 10:33:54 +0000
commitbdd03c20d5b1cd7ca17e2559a44ddcf1da06f3be (patch)
tree3efad8a2559fba312165272eb2abdb7b72b146db /tests
parent93ca6b676cd0ac4c3755bb69cf690dc23a28b22a (diff)
tree: Use <stdio.h> for snprintf
<stdio.h> header is used for input/output operations (such as printf, scanf, fopen, etc.). Although some input/output functions can manipulate strings, they do not need to directly include <string.h> because they are declared independently. Change-Id: Ibe2a4ff6f68843a6d99cfdfe182cf2dd922802aa Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82665 Reviewed-by: Yidi Lin <yidilin@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/lzma-test.c1
-rw-r--r--tests/stubs/die.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/tests/lib/lzma-test.c b/tests/lib/lzma-test.c
index 48d629a179..e4bff5644f 100644
--- a/tests/lib/lzma-test.c
+++ b/tests/lib/lzma-test.c
@@ -4,6 +4,7 @@
#include <helpers/file.h>
#include <lib.h>
#include <lib/lzmadecode.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
diff --git a/tests/stubs/die.c b/tests/stubs/die.c
index 84bb401ab0..86e5056c5b 100644
--- a/tests/stubs/die.c
+++ b/tests/stubs/die.c
@@ -1,7 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <stdarg.h>
-#include <stdio.h>
#include <tests/test.h>
void die(const char *msg, ...)