summaryrefslogtreecommitdiff
path: root/support-files
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2016-06-24 02:25:14 +0300
committerMonty <monty@mariadb.org>2016-06-24 02:25:14 +0300
commit4dc50758603d6ed2891412fdb6d37cd8b5541999 (patch)
treec31def9d565271ff6ca10ec9c15433a12e91bba6 /support-files
parentec38c7e60bf8dbe54b1551e75254337bec1993a4 (diff)
downloadmariadb-git-4dc50758603d6ed2891412fdb6d37cd8b5541999.tar.gz
Fixed compiler warnings and test failures found by buildbot
Fixed ccfilter to detect errors where the column is included in the error message
Diffstat (limited to 'support-files')
-rw-r--r--support-files/ccfilter33
-rw-r--r--support-files/compiler_warnings.supp221
2 files changed, 143 insertions, 111 deletions
diff --git a/support-files/ccfilter b/support-files/ccfilter
index e2957cd3228..4e2c6f57836 100644
--- a/support-files/ccfilter
+++ b/support-files/ccfilter
@@ -7,14 +7,20 @@
#
# Use by setting CC="ccfilter gcc" CXX="ccfilter gcc" before ./configure.
#
+# When testing from command line, you can run it as
+# perl ccfilter cat logfile > /dev/null
+# to see the errors that are not filtered
+#
# By default, just filters the output for suppressed warnings. If the
# FAILONWARNING environment variable is set, then instead will fail the
# compile on encountering a non-suppressed warnings.
+
use strict;
use warnings;
my $suppressions;
+my $filter_stderr= $ARGV[0] ne "cat";
open STDOUT_COPY, ">&STDOUT"
or die "Failed to dup stdout: $!]n";
@@ -27,11 +33,14 @@ if (!defined($pid)) {
# Child.
# actually want to send the STDERR to the parent, not the STDOUT.
# So shuffle things around a bit.
- open STDERR, ">&STDOUT"
- or die "Child: Failed to dup pipe to parent: $!\n";
- open STDOUT, ">&STDOUT_COPY"
- or die "Child: Failed to dup parent stdout: $!\n";
- close STDOUT_COPY;
+ if ($filter_stderr)
+ {
+ open STDERR, ">&STDOUT"
+ or die "Child: Failed to dup pipe to parent: $!\n";
+ open STDOUT, ">&STDOUT_COPY"
+ or die "Child: Failed to dup parent stdout: $!\n";
+ close STDOUT_COPY;
+ }
exec { $ARGV[0] } @ARGV;
die "Child: exec() failed: $!\n";
} else {
@@ -41,9 +50,9 @@ if (!defined($pid)) {
chomp($cwd);
while (<PIPE>) {
my $line= $_;
- if (/^(.*?):([0-9]+): [Ww]arning: (.*)$/) {
+ if (/^(.*?):([0-9]+):(?:[0-9]+:)? [Ww]arning: (.*)$/) {
my ($file, $lineno, $msg)= ($1, $2, $3);
- $file= "$cwd/$file";
+ $file= "$cwd/$file" if (length($file) > 0 && substr($file,0,1) ne "/");
next
if check_if_suppressed($file, $lineno, $msg);
@@ -52,8 +61,14 @@ if (!defined($pid)) {
print STDERR $line;
next;
}
-
- print STDERR $line;
+ if ($filter_stderr)
+ {
+ print STDERR $line;
+ }
+ else
+ {
+ print STDOUT $line;
+ }
}
close(PIPE);
}
diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp
index 727c2f2818a..6b82d83a8fe 100644
--- a/support-files/compiler_warnings.supp
+++ b/support-files/compiler_warnings.supp
@@ -3,61 +3,61 @@
# be ignored for various reasons.
#
-integer.cpp: .*control reaches end of non-void function.*: 1288-1427
-integer.cpp: .*no return statement in function returning non-void.*: 1288-1427
-DictTabInfo.cpp : .*invalid access to non-static.*
-DictTabInfo.cpp : .*macro was used incorrectly.*
-DbdihMain.cpp : .*unused variable.* : 6666-7013
-DbtupExecQuery.cpp : .*unused variable.* : 1823
-kernel_types.h : .*only defines private constructors and has no friends.* : 51
-Dbtup.hpp: .*only defines private constructors and has no friends.*
-diskpage.hpp: .*only defines private constructors and has no friends.*
-tuppage.hpp: .*only defines private constructors and has no friends.*
-sql_yacc.cc : .*label 'yyerrlab1' defined but not used.*
-kernel_types.h : .*'struct Local_key' only defines private constructors and has no friends.*
-lgman.hpp : .*'struct Lgman::Buffer_idx' only defines private constructors and has no friends.*
-SchemaFile.hpp : .*'struct SchemaFile::TableEntry' only defines private constructors and has no friends.*
-sql_yacc.cc : .*switch statement contains 'default' but no 'case' labels.*
+.*/integer.cpp: .*control reaches end of non-void function.*: 1288-1427
+.*/integer.cpp: .*no return statement in function returning non-void.*: 1288-1427
+.*/DictTabInfo.cpp : .*invalid access to non-static.*
+.*/DictTabInfo.cpp : .*macro was used incorrectly.*
+.*/DbdihMain.cpp : .*unused variable.* : 6666-7013
+.*/DbtupExecQuery.cpp : .*unused variable.* : 1823
+.*/kernel_types.h : .*only defines private constructors and has no friends.* : 51
+.*/Dbtup.hpp: .*only defines private constructors and has no friends.*
+.*/diskpage.hpp: .*only defines private constructors and has no friends.*
+.*/tuppage.hpp: .*only defines private constructors and has no friends.*
+.*/sql_yacc.cc : .*label 'yyerrlab1' defined but not used.*
+.*/kernel_types.h : .*'struct Local_key' only defines private constructors and has no friends.*
+.*/lgman.hpp : .*'struct Lgman::Buffer_idx' only defines private constructors and has no friends.*
+.*/SchemaFile.hpp : .*'struct SchemaFile::TableEntry' only defines private constructors and has no friends.*
+.*/sql_yacc.cc : .*switch statement contains 'default' but no 'case' labels.*
#
# Things that can be ignored in InnoDB
#
-pars0grm.tab.c: .*'yyerrorlab' : unreferenced label.*
-pars0grm.c: 'yyerrorlab' : unreferenced label
-_flex_tmp.c: .*not enough actual parameters for macro 'yywrap'.*
-lexyy.c : not enough actual parameters for macro 'yywrap'
-pars0lex.l: .*conversion from 'ulint' to 'int', possible loss of data.*
-include/buf0buf\.ic: unused parameter .*mtr.*
-fil/fil0fil\.c: pointer targets in passing argument.*differ in signedness
-fil/fil0fil\.c: comparison between signed and unsigned : 3100-3199
-fil/fil0fil\.c: unused parameter
-log/log0recv\.c: unused variable
-os/os0file\.c: unused parameter
-os/os0file\.c: pointer targets in assignment differ in signedness
-handler/i_s\.cc: unused variable
-sync/sync0rw\.c: unused parameter
-sync/sync0sync\.c: unused parameter
-sync/sync0sync\.c: unused variable
-ut/ut0ut\.c: ignoring return value of
-srv/srv0srv\.c: value computed is not used
-buf/buf0buf\.c: .*block_mutex.* might be used uninitialized
-btr/btr0cur\.c: null argument where non-null required: 1800-3000
-btr/btr0btr\.c: null argument where non-null required
-btr/btr0cur\.c: .*value computed is not used.*: 3175-3375
-btr/btr0sea\.c: passing argument 2 .* discards qualifiers from pointer target type
-ibuf/ibuf0ibuf.c: null argument where non-null required: 700-1000
-fsp0fsp\.c: result of 32-bit shift implicitly converted to 64 bits
-log/log0log\.c : passing arg 1 of `atomic_add_64_nv' from incompatible pointer type
-log/log0online\.c : passing arg 1 of `atomic_add_64_nv' from incompatible pointer type
-buf/buf0buf\.c : label.*loop2.* defined but not used
+.*/pars0grm.tab.c: .*'yyerrorlab' : unreferenced label.*
+.*/pars0grm.c: 'yyerrorlab' : unreferenced label
+.*/_flex_tmp.c: .*not enough actual parameters for macro 'yywrap'.*
+.*/lexyy.c : not enough actual parameters for macro 'yywrap'
+.*/pars0lex.l: .*conversion from 'ulint' to 'int', possible loss of data.*
+.*/include/buf0buf\.ic: unused parameter .*mtr.*
+.*/fil/fil0fil\.c: pointer targets in passing argument.*differ in signedness
+.*/fil/fil0fil\.c: comparison between signed and unsigned : 3100-3199
+.*/fil/fil0fil\.c: unused parameter
+.*/log/log0recv\.c: unused variable
+.*/os/os0file\.c: unused parameter
+.*/os/os0file\.c: pointer targets in assignment differ in signedness
+.*/handler/i_s\.cc: unused variable
+.*/sync/sync0rw\.c: unused parameter
+.*/sync/sync0sync\.c: unused parameter
+.*/sync/sync0sync\.c: unused variable
+.*/ut/ut0ut\.c: ignoring return value of
+.*/srv/srv0srv\.c: value computed is not used
+.*/buf/buf0buf\.c: .*block_mutex.* might be used uninitialized
+.*/btr/btr0cur\.c: null argument where non-null required: 1800-3000
+.*/btr/btr0btr\.c: null argument where non-null required
+.*/btr/btr0cur\.c: .*value computed is not used.*: 3175-3375
+.*/btr/btr0sea\.c: passing argument 2 .* discards qualifiers from pointer target type
+.*/ibuf/ibuf0ibuf.c: null argument where non-null required: 700-1000
+.*/fsp0fsp\.c: result of 32-bit shift implicitly converted to 64 bits
+.*/log/log0log\.c : passing arg 1 of `atomic_add_64_nv' from incompatible pointer type
+.*/log/log0online\.c : passing arg 1 of `atomic_add_64_nv' from incompatible pointer type
+.*/buf/buf0buf\.c : label.*loop2.* defined but not used
#
# Xtradb engine
#
-storage/xtradb/handler/ha_innodb\.cc: ignoring return value of
-storage/xtradb/row/row0log\.cc: ignoring return value of
-storage/xtradb/btr/btr0cur\.cc : null argument where non-null required
-storage/xtradb/btr/btr0scrub\.cc : null argument where non-null required
+.*/storage/xtradb/handler/ha_innodb\.cc: ignoring return value of
+.*/storage/xtradb/row/row0log\.cc: ignoring return value of
+.*/storage/xtradb/btr/btr0cur\.cc : null argument where non-null required
+.*/storage/xtradb/btr/btr0scrub\.cc : null argument where non-null required
#
# bdb is not critical to keep up to date
@@ -66,29 +66,29 @@ storage/xtradb/btr/btr0scrub\.cc : null argument where non-null required
.*/bdb/.* : .*unused parameter.*
.*/bdb/.* : .*may be used uninitialized.*
.*/bdb/.* : .*empty body in an if-statement.*
-db_vrfy.c : .*comparison is always false due to limited range of data type.*
+.*/db_vrfy.c : .*comparison is always false due to limited range of data type.*
#
# readline is not maintained by us
#
.*/cmd-line-utils/readline/.* : .*
-readline\.c : unused parameter
-term\.c : unused parameter
-vi\.c : unused parameter
-common\.c : unused parameter
-term\.c : .*
+.*/readline\.c : unused parameter
+.*/term\.c : unused parameter
+.*/vi\.c : unused parameter
+.*/common\.c : unused parameter
+.*/term\.c : .*
#
# Ignore some warnings in libevent, which is not maintained by us.
#
.*/extra/libevent/.* : .*unused parameter.*
.*/extra/libevent/select\.c : .*comparison between signed and unsigned.* : 270-280
-signal\.c : .*unused parameter.*
+.*/signal\.c : .*unused parameter.*
#
# Ignore warnings from system libraries
#
-/usr/share/aclocal/audiofile.m4 : .*
+.*/aclocal/audiofile.m4 : .*
#
# Ignore strict-aliasing warnings (for now)
@@ -131,30 +131,30 @@ signal\.c : .*unused parameter.*
#
# Aria warning that is ok in debug builds
#
-storage/maria/ma_pagecache.c: .*'info_check_pin' defined but not used
+.*/storage/maria/ma_pagecache.c: .*'info_check_pin' defined but not used
#
# oqgraph errors that are hard to fix
#
-oqgraph/graphcore\.cc : may be used uninitialized in this function
+.*/oqgraph/graphcore\.cc : may be used uninitialized in this function
#
# Yassl
#
-include/runtime.hpp: .*pure_error.*
+.*/include/runtime.hpp: .*pure_error.*
.*/extra/yassl/.*taocrypt/.*: comparison with string literal
.*/extra/yassl/taocrypt/src/blowfish\.cpp: array subscript is above array bounds
.*/extra/yassl/taocrypt/src/file\.cpp: ignoring return value
.*/extra/yassl/taocrypt/src/integer\.cpp: control reaches end of non-void function
-mySTL/algorithm\.hpp: is used uninitialized in this function
-include/pwdbased\.hpp: comparison of unsigned expression
+.*/mySTL/algorithm\.hpp: is used uninitialized in this function
+.*/include/pwdbased\.hpp: comparison of unsigned expression
#
# OpenSSL
#
# The following comes because of different prototype between yassl and openssl.
# Save as the argument is a function withing the library.
-vio/viosslfactories\.c: discards ~const~ qualifier from pointer target type
+.*/vio/viosslfactories\.c: discards ~const~ qualifier from pointer target type
#
# Groff warnings on OpenSUSE.
@@ -166,88 +166,105 @@ vio/viosslfactories\.c: discards ~const~ qualifier from pointer target type
# Warnings on OpenSolaris
#
.*/my_config\.h : _FILE_OFFSET_BITS
-/usr/include/sys/feature_tests.h : this is the location of the previous definition
-.*auth_pam\.c : initialization from incompatible pointer type : 100-200
+.*/include/sys/feature_tests.h : this is the location of the previous definition
+.*/auth_pam\.c : initialization from incompatible pointer type : 100-200
+.*/mysys/my_lock\.c : incompatible pointer
#
# jemalloc
#
-jemalloc/src/jemalloc\.c: always_inline function might not be inlinable
-jemalloc/src/jemalloc\.c: set but not used
+.*/jemalloc/src/jemalloc\.c: always_inline function might not be inlinable
+.*/jemalloc/src/jemalloc\.c: set but not used
#
# Connect engine
#
-storage/connect/ha_connect\.cc: might be clobbered by.*longjmp
-storage/connect/connect\.cc: might be clobbered by.*longjmp
-storage/connect/filamvct\.cpp: ignoring return value of
-storage/connect/filamvct\.cpp: might be clobbered by
-storage/connect/xindex\.cpp: ignoring return value of
-storage/connect/value\.cpp: always false
-storage/connect/json\.cpp: might be clobbered by
+.*/storage/connect/ha_connect\.cc: might be clobbered by.*longjmp
+.*/storage/connect/connect\.cc: might be clobbered by.*longjmp
+.*/storage/connect/filamvct\.cpp: ignoring return value of
+.*/storage/connect/filamvct\.cpp: might be clobbered by
+.*/storage/connect/xindex\.cpp: ignoring return value of
+.*/storage/connect/value\.cpp: always false : 1000-1020
+.*/storage/connect/json\.cpp: might be clobbered by
#
# mroonga
#
-groonga/lib/expr\.c: propagation disabled
-groonga/lib/expr\.c: PRE disabled
-groonga/lib/expr\.c: always false
+.*/groonga/lib/expr\.c : GCSE disabled
+.*/groonga/lib/expr\.c : NULL pointer checks disabled
+.*/groonga/lib/expr\.c : PRE disabled
+.*/groonga/lib/expr\.c : always false
+.*/groonga/lib/expr\.c : jump bypassing disabled
+.*/groonga/lib/expr\.c : propagation disabled
+.*/groonga/lib/nfkc\.c : GCSE disabled
+.*/groonga/lib/nfkc\.c : NULL pointer checks disabled
+.*/groonga/lib/nfkc\.c : jump bypassing disabled
+.*/groonga/lib/str\.c : comparing floating point
+.*/groonga/lib/db\.c : missing initializer
+.*/groonga/lib/ii\.c : missing initializer
+.*/groonga/lib/normalizer\.c : missing initializer
+.*/groonga/lib/proc\.c : missing initializer
+.*/groonga/lib/tokenizer\.c : missing initializer
#
-# Mroonga
+# TokuDB
#
-groonga/lib/expr\.c : const/copy propagation disabled
+
+# This one is marked with __attribute__, but we still get a (wrong) warning
+.*/liblzma/lz/lz_encoder\.c : variable.*in_used.*set but not used
#
# Unexplanable (?) stuff
#
-listener\.cc : .*conversion from 'SOCKET' to 'int'.*
-net_serv\.cc : .*conversion from 'SOCKET' to 'int'.*
+.*/listener\.cc : .*conversion from 'SOCKET' to 'int'.*
+.*/net_serv\.cc : .*conversion from 'SOCKET' to 'int'.*
#
# Ignorable warnings from header files
#
-backward_warning\.h : This file includes at least one
+.*/backward_warning\.h : This file includes at least one
/usr/include/i386-linux-gnu/bits/string3\.h: memset used with constant zero length parameter
-bits/string3.h : might overflow destination buffer
+.*/bits/string3.h : might overflow destination buffer
# allow a little moving space for the warning below
-mi_packrec\.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 560-600
-ma_packrec\.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 550-650
+.*/mi_packrec\.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 560-600
+.*/ma_packrec\.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 550-650
#
# Wrong compiler warnings
#
.* : .*no matching operator delete found; memory will not be freed if initialization throws an exception.*
-ctype-simple\.c : .*unary minus operator applied to unsigned type, result still unsigned.*
-sql/sys_vars\.cc : invalid access to non-static data member
-string3\.h : memset used with constant zero length parameter
+.*/ctype-simple\.c : .*unary minus operator applied to unsigned type, result still unsigned.*
+.*/sql/sys_vars\.cc : invalid access to non-static data member
+.*/string3\.h : memset used with constant zero length parameter
+.*/sql/wsrep_hton\.cc : NULL used in arithmetic : 500-600
+.* : missing-declarations.*is valid
#
# Ignorable errors on mac
#
-my_aes\.c: deprecated
-my_sha1\.cc: deprecated
-my_md5\.cc: deprecated
-my_rnd\.cc: deprecated
-mdl\.cc: invalid access
-mdl\.cc: offsetoff
+.*/my_aes\.c: deprecated
+.*/my_sha1\.cc: deprecated
+.*/my_md5\.cc: deprecated
+.*/my_rnd\.cc: deprecated
+.*/mdl\.cc: invalid access
+.*/mdl\.cc: offsetoff
# Wrong warning due to GCC bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478
-regexec\.c : passing argument 3 of.*matcher.* discards qualifiers from pointer target type
-libmysql\.c: passing argument 2 of .*memcpy.* discards qualifiers from pointer target type : 3000-4000
-storage/.*/dict/dict0dict\.c : passing argument 1 of .*strcpy.* discards qualifiers from pointer target type : 2500-3500
-storage/.*/sync/sync0rw\.c : passing argument 1 of .*memset.* discards qualifiers from pointer target type : 200-300
-storage/.*/btr/btr0sea\.c : passing argument 2 of .*btr_cur_position.* discards qualifiers from pointer
+.*/regexec\.c : passing argument 3 of.*matcher.* discards qualifiers from pointer target type
+.*/libmysql\.c: passing argument 2 of .*memcpy.* discards qualifiers from pointer target type : 3000-4000
+.*/storage/.*/dict/dict0dict\.c : passing argument 1 of .*strcpy.* discards qualifiers from pointer target type : 2500-3500
+.*/storage/.*/sync/sync0rw\.c : passing argument 1 of .*memset.* discards qualifiers from pointer target type : 200-300
+.*/storage/.*/btr/btr0sea\.c : passing argument 2 of .*btr_cur_position.* discards qualifiers from pointer
# Fixed wrong warning in GCC due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61520
-
-strings/decimal.c: array subscript is below array bounds
+.*/strings/decimal\.c : array subscript is .* array bounds
#
# Strange things from autoconf that is probably safe to ignore
#
-configure.in : warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
-configure.in : config/ac-macros/character_sets.m4.*prefer named diversions
-warning: File listed twice
+.*configure.in : warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
+.*configure.in : config/ac-macros/character_sets.m4.*prefer named diversions warning: File listed twice
+.*/include/mysql/client_plugin\.h : _mysql_client_plugin_declaration_
+.*/plugin/auth_gssapi/client_plugin\.cc: _mysql_client_plugin_declaration_