aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-01-20 17:17:06 +0000
committerPeter Maydell <peter.maydell@linaro.org>2017-01-20 17:17:06 +0000
commit07770f0523e42368d8ffd6949fc42534a923e6dd (patch)
tree8e8f789aa2b6c6fab26c263d2898bbb4439c69c2
parentdb593e708b675fa728411252b61b7e7487f0521c (diff)
test4.c, test5.c: Avoid format string errors
Rather than passing a variable string as a printf format string, use "%s". This avoids a warning from compilers which check for this common bug. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--test4.c2
-rw-r--r--test5.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/test4.c b/test4.c
index f8b425f..c2c1701 100644
--- a/test4.c
+++ b/test4.c
@@ -17,7 +17,7 @@ unsigned testseq;
static inline
void test_equal(const char *m, uint32_t expect, uint32_t actual)
{
- testEqI(expect, actual, m);
+ testEqI(expect, actual, "%s", m);
}
static
diff --git a/test5.c b/test5.c
index 86cb13c..f3a4eba 100644
--- a/test5.c
+++ b/test5.c
@@ -13,7 +13,7 @@ unsigned testseq;
static inline
void test_equal(const char *m, uint32_t expect, uint32_t actual)
{
- testEqI(expect, actual, m);
+ testEqI(expect, actual, "%s", m);
}
extern char _main_stack_top, _proc_stack_top;