diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-06-05 19:22:02 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-06-05 19:22:02 (GMT) |
commit | efe9665be8bd9bc060ecb9c91ea3e794a3c8cd59 (patch) | |
tree | 7beed219b8d14dbd80936f2340baee45bff2684d /timings | |
parent | 80ab6440d1010d56e922fc99230b5a8426363885 (diff) | |
download | SCons-efe9665be8bd9bc060ecb9c91ea3e794a3c8cd59.zip SCons-efe9665be8bd9bc060ecb9c91ea3e794a3c8cd59.tar.gz SCons-efe9665be8bd9bc060ecb9c91ea3e794a3c8cd59.tar.bz2 |
Fix improper c code in benchmark. It was yielding warnings compiling on mac and thus the test failed
Diffstat (limited to 'timings')
-rwxr-xr-x | timings/ElectricCloud/genscons.pl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/timings/ElectricCloud/genscons.pl b/timings/ElectricCloud/genscons.pl index 02886c0..f573c1d 100755 --- a/timings/ElectricCloud/genscons.pl +++ b/timings/ElectricCloud/genscons.pl @@ -47,6 +47,9 @@ $OBJ = ".o"; #} sub init() { + +# use strict; +# use warnings FATAL => 'all'; use Getopt::Std; my $opt_string = 'd:f:g:l:u:h'; getopts ( "$opt_string", \%opt) or usage (); @@ -125,21 +128,21 @@ sub gen_cfile { print CFILE $buff; if ($group == 1) { - print CFILE "main (int argc, char * argv[]) {\n" + print CFILE "int main (int argc, char * argv[]) {\n" . "\tint i, mb_out;\n" . "\tprintf (\"I am $basedir/%s\\n\", \"$filname[$idx]\"" . ");\n" . "\treturn (0);\n}\n"; } elsif ( ($group - ($fil[$idx] % $group)) == 1) { - print CFILE "printr_$filname[$idx] (char * fname) {\n" + print CFILE "int printr_$filname[$idx] (char * fname) {\n" . " printf (\"I am $basedir/%s\\n\", fname);\n" . " return (0);\n}\n"; } elsif ( ($fil[$idx] % $group) == 0) { $idx2 = $fil[$idx] + 1; print CFILE "extern int printr_$file[$idx2] (char * fname);\n" - . "main (int argc, char * argv[]) {\n" + . "int main (int argc, char * argv[]) {\n" . "\tint i, mb_out;\n"; print CFILE "\tprintr_$file[$idx2] (\"$filname[$idx]\");\n" @@ -157,7 +160,7 @@ sub gen_cfile { else { $idx2 = $fil[$idx] + 1; print CFILE "extern int printr_$file[$idx2] (char * fname);\n" - . "printr_$filname[$idx] (char * fname) {\n" + . "int printr_$filname[$idx] (char * fname) {\n" . " printr_$file[$idx2] (fname);\n" . " return (0);\n}\n"; } |