diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 5865e30d..262fc0ea 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,8 +13,8 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 377, - BUILD_DATE => "2012-08-15", + BUILD_REVISION => 378, + BUILD_DATE => "2012-08-17", }; 1; diff --git a/modules/compiler_vm/compiler_vm_client.pl b/modules/compiler_vm/compiler_vm_client.pl index c05f0fb1..680d3354 100755 --- a/modules/compiler_vm/compiler_vm_client.pl +++ b/modules/compiler_vm/compiler_vm_client.pl @@ -24,9 +24,9 @@ my %languages = ( ); my %preludes = ( - 'C99' => "#define _XOPEN_SOURCE\n#define __USE_XOPEN\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n", - 'C11' => "#define _XOPEN_SOURCE\n#define __USE_XOPEN\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n", - 'C' => "#define _XOPEN_SOURCE\n#define __USE_XOPEN\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n", + 'C99' => "#define _XOPEN_SOURCE 9001\n#define __USE_XOPEN\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n", + 'C11' => "#define _XOPEN_SOURCE 9001\n#define __USE_XOPEN\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n", + 'C' => "#define _XOPEN_SOURCE 9001\n#define __USE_XOPEN\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n", ); sub pretty { @@ -826,6 +826,13 @@ if($output =~ m/^\s*$/) { $output =~ s/In function\s*`main':\s*\/home\/compiler\/ undefined reference to/error: undefined reference to/g; $output =~ s/\/home\/compiler\///g; $output =~ s/compilation terminated.//; + $output =~ s/<'(.)' = char>/<'$1' = int>/g; + $output =~ s/, //g; + + # remove duplicate warnings/infos + $output =~ s/(warning: .*?\s)\1/$1/g; + $output =~ s/(info: .*?\s)\1/$1/g; + $output =~ s/^\[\s+(warning:|info:)/[$1/; # remove leading spaces in first warning/info # splint $output =~ s/Splint 3.1.2 --- 03 May 2009\s*//; @@ -854,6 +861,7 @@ if($output =~ m/^\s*$/) { $output =~ s/\s*Storage\s*.*?\s*becomes\s*static//gs; $output =~ s/Possibly\s*null\s*storage\s*passed\s*as\s*non-null\s*param:/Possibly null storage passed to function:/g; $output =~ s/A\s*possibly\s*null\s*pointer\s*is\s*passed\s*as\s*a\s*parameter\s*corresponding\s*to\s*a\s*formal\s*parameter\s*with\s*no\s*\/\*\@null\@\*\/\s*annotation.\s*If\s*NULL\s*may\s*be\s*used\s*for\s*this\s*parameter,\s*add\s*a\s*\/\*\@null\@\*\/\s*annotation\s*to\s*the\s*function\s*parameter\s*declaration./A possibly null pointer is passed as a parameter to a function./gs; + $output =~ s/ called by \?\? \(\)//g; } unless($got_run) {