mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-10 20:12:35 +01:00
compiler_vm: update client to remove duplicate warnings/infos; typeof('a') should be int; misc output clean-ups
This commit is contained in:
parent
da3e05bc72
commit
09cb762c6f
@ -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;
|
||||
|
@ -24,9 +24,9 @@ my %languages = (
|
||||
);
|
||||
|
||||
my %preludes = (
|
||||
'C99' => "#define _XOPEN_SOURCE\n#define __USE_XOPEN\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n#include <math.h>\n#include <limits.h>\n#include <sys/types.h>\n#include <stdint.h>\n#include <stdbool.h>\n#include <stddef.h>\n#include <stdarg.h>\n#include <ctype.h>\n#include <inttypes.h>\n#include <float.h>\n#include <errno.h>\n#include <time.h>\n#include <assert.h>\n#include <prelude.h>\n\n",
|
||||
'C11' => "#define _XOPEN_SOURCE\n#define __USE_XOPEN\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n#include <math.h>\n#include <limits.h>\n#include <sys/types.h>\n#include <stdint.h>\n#include <stdbool.h>\n#include <stddef.h>\n#include <stdarg.h>\n#include <stdnoreturn.h>\n#include <stdalign.h>\n#include <ctype.h>\n#include <inttypes.h>\n#include <float.h>\n#include <errno.h>\n#include <time.h>\n#include <assert.h>\n#include <complex.h>\n#include <prelude.h>\n\n",
|
||||
'C' => "#define _XOPEN_SOURCE\n#define __USE_XOPEN\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n#include <math.h>\n#include <limits.h>\n#include <sys/types.h>\n#include <stdint.h>\n#include <errno.h>\n#include <ctype.h>\n#include <assert.h>\n#include <prelude.h>\n\n",
|
||||
'C99' => "#define _XOPEN_SOURCE 9001\n#define __USE_XOPEN\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n#include <math.h>\n#include <limits.h>\n#include <sys/types.h>\n#include <stdint.h>\n#include <stdbool.h>\n#include <stddef.h>\n#include <stdarg.h>\n#include <ctype.h>\n#include <inttypes.h>\n#include <float.h>\n#include <errno.h>\n#include <time.h>\n#include <assert.h>\n#include <prelude.h>\n\n",
|
||||
'C11' => "#define _XOPEN_SOURCE 9001\n#define __USE_XOPEN\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n#include <math.h>\n#include <limits.h>\n#include <sys/types.h>\n#include <stdint.h>\n#include <stdbool.h>\n#include <stddef.h>\n#include <stdarg.h>\n#include <stdnoreturn.h>\n#include <stdalign.h>\n#include <ctype.h>\n#include <inttypes.h>\n#include <float.h>\n#include <errno.h>\n#include <time.h>\n#include <assert.h>\n#include <complex.h>\n#include <prelude.h>\n\n",
|
||||
'C' => "#define _XOPEN_SOURCE 9001\n#define __USE_XOPEN\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <unistd.h>\n#include <math.h>\n#include <limits.h>\n#include <sys/types.h>\n#include <stdint.h>\n#include <errno.h>\n#include <ctype.h>\n#include <assert.h>\n#include <prelude.h>\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/, <incomplete sequence >//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) {
|
||||
|
Loading…
Reference in New Issue
Block a user