From 4fd58c6494080302c4fc765c83cb76b5947d1cae Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sat, 18 Nov 2017 20:53:51 -0800 Subject: tests: Fix compilation of cprinftest. This test has been broken since 70176fecd1ff04 in 2014. The problem was that the array size in the test was technically not constant because it was based on an int variable that wasn't declared as const. That prevented g++ from resolving it as a template parameter. Before the change mentioned above, the implementation wasn't based on templates. Change-Id: I6819cf522f9ba4636ac661da368b9bcbae0a813f Reviewed-on: https://gem5-review.googlesource.com/5821 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power --- src/unittest/cprintftest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/unittest') diff --git a/src/unittest/cprintftest.cc b/src/unittest/cprintftest.cc index 7e6d2f2d4..091d292bc 100644 --- a/src/unittest/cprintftest.cc +++ b/src/unittest/cprintftest.cc @@ -45,7 +45,7 @@ main() cprintf("%s\n", foo); string _bar = "asdfkhasdlkfjhasdlkfhjalksdjfhalksdjhfalksdjfhalksdjhf"; - int length = 11; + const int length = 11; char bar[length + 1]; bar[length] = 0; -- cgit v1.2.3