mariadb/BUILD
Davi Arnaut 0eb26fdfa8 Bug#53445: Build with -Wall and fix warnings that it generates
Apart strict-aliasing warnings, fix the remaining warnings
generated by GCC 4.4.4 -Wall and -Wextra flags.

One major source of warnings was the in-house function my_bcmp
which (unconventionally) took pointers to unsigned characters
as the byte sequences to be compared. Since my_bcmp and bcmp
are deprecated functions whose only difference with memcmp is
the return value, every use of the function is replaced with
memcmp as the special return value wasn't actually being used
by any caller.

There were also various other warnings, mostly due to type
mismatches, missing return values, missing prototypes, dead
code (unreachable) and ignored return values.

BUILD/SETUP.sh:
  Remove flags that are implied by -Wall and -Wextra.
  Do not warn about unused parameters in C++.
BUILD/check-cpu:
  Print only the compiler version instead of verbose banner.
  Although the option is gcc specific, the check was only
  being used for GCC specific checks anyway.
client/mysql.cc:
  bcmp is no longer defined.
client/mysqltest.cc:
  Pass a string to function expecting a format string.
  Replace use of bcmp with memcmp.
cmd-line-utils/readline/Makefile.am:
  Always define _GNU_SOURCE when compiling GNU readline.
  Required to make certain prototypes visible.
cmd-line-utils/readline/input.c:
  Condition for the code to be meaningful.
configure.in:
  Remove check for bcmp.
extra/comp_err.c:
  Use appropriate type.
extra/replace.c:
  Replace use of bcmp with memcmp.
extra/yassl/src/crypto_wrapper.cpp:
  Do not ignore the return value of fgets. Retrieve the file
  position if fgets succeed -- if it fails, the function will
  bail out and return a error.
extra/yassl/taocrypt/include/blowfish.hpp:
  Use a single array instead of accessing positions of the sbox_
  through a subscript to pbox_.
extra/yassl/taocrypt/include/runtime.hpp:
  One definition of such functions is enough.
extra/yassl/taocrypt/src/aes.cpp:
  Avoid potentially ambiguous conditions.
extra/yassl/taocrypt/src/algebra.cpp:
  Rename arguments to avoid shadowing related warnings.
extra/yassl/taocrypt/src/blowfish.cpp:
  Avoid potentially ambiguous conditions.
extra/yassl/taocrypt/src/integer.cpp:
  Do not define type within a anonymous union.
  Use a variable to return a value instead of
  leaving the result in a register -- compiler
  does not know the logic inside the asm.
extra/yassl/taocrypt/src/misc.cpp:
  Define handler for pure virtual functions.
  Remove unused code.
extra/yassl/taocrypt/src/twofish.cpp:
  Avoid potentially ambiguous conditions.
extra/yassl/testsuite/test.hpp:
  Function must have C language linkage.
include/m_string.h:
  Remove check which relied on bcmp being defined -- they weren't
  being used as bcmp is only visible when _BSD_SOURCE is defined.
include/my_bitmap.h:
  Remove bogus helpers which were used only in a few files and
  were causing warnings about dead code.
include/my_global.h:
  Due to G++ bug, always silence false-positive uninitialized
  variables warnings when compiling C++ code with G++.
  Remove bogus helper.
libmysql/Makefile.shared:
  Remove built-in implementation of bcmp.
mysql-test/lib/My/SafeProcess/safe_process.cc:
  Cast pid to largest possible type for a process identifier.
mysys/mf_loadpath.c:
  Leave space of the ending nul.
mysys/mf_pack.c:
  Replace bcmp with memcmp.
mysys/my_bitmap.c:
  Dead code removal.
mysys/my_gethwaddr.c:
  Remove unused variable.
mysys/my_getopt.c:
  Silence bogus uninitialized variable warning.
  Do not cast away the constant qualifier.
mysys/safemalloc.c:
  Cast to expected type.
mysys/thr_lock.c:
  Silence bogus uninitialized variable warning.
sql/field.cc:
  Replace bogus helper with a more appropriate logic which is
  used throughout the code.
sql/item.cc:
  Remove bogus logical condition which always evaluates to TRUE.
sql/item_create.cc:
  Simplify code to avoid signedness related warnings.
sql/log_event.cc:
  Replace use of bcmp with memcmp.
  No need to use helpers for simple bit operations.
sql/log_event_old.cc:
  Replace bmove_align with memcpy.
sql/mysqld.cc:
  Move use declaration of variable to the ifdef block where it
  is used. Remove now-unnecessary casts and arguments.
sql/set_var.cc:
  Replace bogus helpers with simple and classic bit operations.
sql/slave.cc:
  Cast to expected type and silence bogus warning.
sql/sql_class.h:
  Don't use enum values as bit flags, the supposed type safety is
  bogus as the combined bit flags are not a value in the enumeration.
sql/udf_example.c:
  Only declare variable when necessary.
sql/unireg.h:
  Replace use of bmove_align with memcpy.
storage/innobase/os/os0file.c:
  Silence bogus warning.
storage/myisam/mi_open.c:
  Remove bogus cast, DBUG_DUMP expects a pointer to unsigned
  char.
storage/myisam/mi_page.c:
  Remove bogus cast, DBUG_DUMP expects a pointer to unsigned
  char.
strings/bcmp.c:
  Remove built-in bcmp.
strings/ctype-ucs2.c:
  Silence bogus warning.
tests/mysql_client_test.c:
  Use a appropriate type as expected by simple_command().
2010-07-02 15:30:47 -03:00
..
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
autorun.sh autorun.sh: 2007-10-29 22:48:58 +01:00
build_mccge.sh Don't enable safemalloc for valgrind builds, it's too slow. 2010-06-03 09:54:37 -03:00
check-cpu Bug#53445: Build with -Wall and fix warnings that it generates 2010-07-02 15:30:47 -03:00
cleanup hanged UDF interface to use clear() instead of reset() 2003-08-27 22:30:50 +03:00
compile-alpha Update to autoconf 2.52 2002-02-07 21:34:35 +02:00
compile-alpha-ccc BUILD scripts: s/(dist)?clean/maintainer-clean/ 2007-01-28 21:09:54 +01:00
compile-alpha-cxx BUILD scripts: s/(dist)?clean/maintainer-clean/ 2007-01-28 21:09:54 +01:00
compile-alpha-debug BUILD scripts: s/(dist)?clean/maintainer-clean/ 2007-01-28 21:09:54 +01:00
compile-amd64-debug-max Remove dead code from BUILD/ scripts: $debug_extra_warnings is 2006-04-05 17:50:33 +04:00
compile-amd64-debug-max-no-ndb Remove dead code from BUILD/ scripts: $debug_extra_warnings is 2006-04-05 17:50:33 +04:00
compile-amd64-gcov Bug#23062 (GCOV build: helper scripts missing in the BUILD directory) 2007-08-15 18:10:16 -06:00
compile-amd64-gprof Bug#23062 (GCOV build: helper scripts missing in the BUILD directory) 2007-08-15 18:10:16 -06:00
compile-amd64-max Remove dead code from BUILD/ scripts. 2006-04-05 16:50:12 +04:00
compile-amd64-max-sci New SCI Transporter Build scripts 2007-05-07 15:33:27 +02:00
compile-amd64-valgrind-max Bug#53593: Add some instrumentation to improve Valgrind sensitivity 2010-05-20 13:40:42 +03:00
compile-darwin-mwcc Remove dead code from BUILD/ scripts: $debug_extra_warnings is 2006-04-05 17:50:33 +04:00
compile-dist Merge the bashism removal from 5.0 up to 5.1-build 2008-12-28 16:18:08 +01:00
compile-hpux11-parisc2-aCC BUILD scripts: s/(dist)?clean/maintainer-clean/ 2007-01-28 21:09:54 +01:00
compile-ia64-debug-max BUILD scripts: s/(dist)?clean/maintainer-clean/ 2007-01-28 21:09:54 +01:00
compile-irix-mips64-mipspro BUILD scripts: s/(dist)?clean/maintainer-clean/ 2007-01-28 21:09:54 +01:00
compile-ndb-autotest ndb - 2006-08-02 09:08:21 +02:00
compile-pentium BUG#27701 don't pass arguments to sourced script if they're not modified as this is either a no-op (if done correctly), a different no-op with some shells (if done the bash way, but with correct quoting) or breaks arguments with whitespace for some shells (if done the bash way, without quotes). 2007-04-11 14:12:00 +02:00
compile-pentium-cybozu Add missing parts for the "Cybozu" custom build, to avoid future manual patches. 2005-04-08 13:56:48 +02:00
compile-pentium-debug Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-27701 2007-04-11 14:06:03 +02:00
compile-pentium-debug-max Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-27701 2007-04-11 14:06:03 +02:00
compile-pentium-debug-max-no-embedded Implement --warning-mode in SETUP.sh. The value of the 2006-04-07 02:25:59 +04:00
compile-pentium-debug-max-no-ndb Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-27701 2007-04-11 14:06:03 +02:00
compile-pentium-debug-openssl BUG#18818 configure: No longer finds OpenSSL on Mac OS X 2006-05-17 13:59:37 +02:00
compile-pentium-debug-yassl BUG#18818 configure: No longer finds OpenSSL on Mac OS X 2006-05-17 13:59:37 +02:00
compile-pentium-gcov Manual merge 2007-08-22 12:02:23 -06:00
compile-pentium-gprof Bug#23062 (GCOV build: helper scripts missing in the BUILD directory) 2007-08-15 18:10:16 -06:00
compile-pentium-icc Bug #12717 yassl: Crashes in "integer.cpp" when compiled with icc 2005-09-01 14:07:45 +02:00
compile-pentium-icc-valgrind-max Bug#53593: Add some instrumentation to improve Valgrind sensitivity 2010-05-20 13:40:42 +03:00
compile-pentium-icc-yassl Bug #12717 yassl: Crashes in "integer.cpp" when compiled with icc 2005-09-01 14:07:45 +02:00
compile-pentium-max Remove dead code from BUILD/ scripts. 2006-04-05 16:50:12 +04:00
compile-pentium-myodbc - cleaned up BUILD scripts 2000-12-18 23:24:19 +02:00
compile-pentium-mysqlfs-debug Remove dead code from BUILD/ scripts: $debug_extra_warnings is 2006-04-05 17:50:33 +04:00
compile-pentium-pgcc BUILD scripts: s/(dist)?clean/maintainer-clean/ 2007-01-28 21:09:54 +01:00
compile-pentium-valgrind-max Bug#53593: Add some instrumentation to improve Valgrind sensitivity 2010-05-20 13:40:42 +03:00
compile-pentium-valgrind-max-no-ndb Bug#53593: Add some instrumentation to improve Valgrind sensitivity 2010-05-20 13:40:42 +03:00
compile-pentium64 BUG#27701 don't pass arguments to sourced script if they're not modified as this is either a no-op (if done correctly), a different no-op with some shells (if done the bash way, but with correct quoting) or breaks arguments with whitespace for some shells (if done the bash way, without quotes). 2007-04-11 14:12:00 +02:00
compile-pentium64-debug Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-27701 2007-04-11 14:06:03 +02:00
compile-pentium64-debug-max Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-27701 2007-04-11 14:06:03 +02:00
compile-pentium64-gcov Bug#23062 (GCOV build: helper scripts missing in the BUILD directory) 2007-08-15 18:10:16 -06:00
compile-pentium64-gprof Bug#23062 (GCOV build: helper scripts missing in the BUILD directory) 2007-08-15 18:10:16 -06:00
compile-pentium64-max BUG#27701 don't pass arguments to sourced script if they're not modified as this is either a no-op (if done correctly), a different no-op with some shells (if done the bash way, but with correct quoting) or breaks arguments with whitespace for some shells (if done the bash way, without quotes). 2007-04-11 14:12:00 +02:00
compile-pentium64-max-sci New SCI Transporter Build scripts 2007-05-07 15:33:27 +02:00
compile-pentium64-valgrind-max Bug#53593: Add some instrumentation to improve Valgrind sensitivity 2010-05-20 13:40:42 +03:00
compile-ppc - fixed file permissions (need execute bits set) 2004-12-02 10:11:28 +01:00
compile-ppc-debug Remove dead code from BUILD/ scripts: $debug_extra_warnings is 2006-04-05 17:50:33 +04:00
compile-ppc-debug-max Remove dead code from BUILD/ scripts: $debug_extra_warnings is 2006-04-05 17:50:33 +04:00
compile-ppc-debug-max-no-ndb Remove dead code from BUILD/ scripts: $debug_extra_warnings is 2006-04-05 17:50:33 +04:00
compile-ppc-max Remove dead code from BUILD/ scripts. 2006-04-05 16:50:12 +04:00
compile-solaris-amd64 Adding build scripts for Solaris 10 on AMD64. 2007-11-10 11:03:07 +01:00
compile-solaris-amd64-debug Adding build scripts for Solaris 10 on AMD64. 2007-11-10 11:03:07 +01:00
compile-solaris-amd64-forte Bug#38727: BUILD/compile-solaris-* scripts should compile MySQL with libmtmalloc 2008-09-30 17:57:48 -03:00
compile-solaris-amd64-forte-debug Bug#38727: BUILD/compile-solaris-* scripts should compile MySQL with libmtmalloc 2008-09-30 17:57:48 -03:00
compile-solaris-sparc Bug#38727: BUILD/compile-solaris-* scripts should compile MySQL with libmtmalloc 2008-09-30 17:57:48 -03:00
compile-solaris-sparc-debug Fixes Bug#30127: --debug-info no longer prints memory usage in mysql 2007-08-01 22:59:05 +03:00
compile-solaris-sparc-forte Bug#38727: BUILD/compile-solaris-* scripts should compile MySQL with libmtmalloc 2008-09-30 17:57:48 -03:00
compile-solaris-sparc-purify Merge bk-internal.mysql.com:/home/bk/mysql-5.1 2007-02-26 16:12:40 +01:00
FINISH.sh BUILD scripts: s/(dist)?clean/maintainer-clean/ 2007-01-28 21:09:54 +01:00
Makefile.am BUILD/Makefile.am 2008-04-18 16:58:47 +02:00
SETUP.sh Bug#53445: Build with -Wall and fix warnings that it generates 2010-07-02 15:30:47 -03:00