Initialize the variable to something.
authorNathan Binkert <binkertn@umich.edu>
Wed, 7 Feb 2007 06:32:37 +0000 (22:32 -0800)
committerNathan Binkert <binkertn@umich.edu>
Wed, 7 Feb 2007 06:32:37 +0000 (22:32 -0800)
--HG--
extra : convert_revision : bfe1e70130719ff239987d725b089c6d7152c541

src/unittest/cprintftest.cc

index a454be05e799d5a873eca426f7fc82bba2456534..7fb10375ce9f11a02f49bc201c7baaf8af8b642a 100644 (file)
@@ -40,7 +40,7 @@ using namespace std;
 int
 main()
 {
-    char foo[9];
+    char foo[] = "foo";
     cprintf("%s\n", foo);
 
     cprintf("%d\n", 'A');