From 603d86bb614c21bdda47bbb11343129344583dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Sat, 3 Jan 2015 01:52:53 +0100 Subject: [PATCH] Remove stdio.h from utils.h. Manually include stdio.h if using the TRACEF() macro from utils.h --- include/ucore/utils.h | 2 +- src/iomux_impl.c | 2 +- test/test_heapsort.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/ucore/utils.h b/include/ucore/utils.h index 9811e1b..614b6bc 100644 --- a/include/ucore/utils.h +++ b/include/ucore/utils.h @@ -2,7 +2,6 @@ #define UC_UTILS_H_ #include -#include //Gnerate a compiler error if the compile time //constant expression fails @@ -74,6 +73,7 @@ const typeof( ((const type *)0)->member ) *__mptr = (ptr); \ #ifdef DEBUG + //include if using the TRACEF() macro #define TRACEF(fmt, ...)\ do { \ fprintf(stdout, "%s (%s)\t" fmt, UC_SRC_LOCATION, __FUNCTION__, ##__VA_ARGS__);\ diff --git a/src/iomux_impl.c b/src/iomux_impl.c index 6f60744..a577b5b 100644 --- a/src/iomux_impl.c +++ b/src/iomux_impl.c @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include "ucore/clock.h" #include "ucore/backtrace.h" diff --git a/test/test_heapsort.c b/test/test_heapsort.c index 0f23e10..3668593 100644 --- a/test/test_heapsort.c +++ b/test/test_heapsort.c @@ -1,4 +1,5 @@ #include +#include #include "ucore/utils.h" #include "ucore/heapsort.h"