diff options
author | Tor Didriksen <tor.didriksen@sun.com> | 2010-05-26 16:12:23 +0200 |
---|---|---|
committer | Tor Didriksen <tor.didriksen@sun.com> | 2010-05-26 16:12:23 +0200 |
commit | 85da8956e62cf5a1e3ed78cb18110e3888822d09 (patch) | |
tree | e02f9ec4f4f64535006e2aeecf1ec1497146b50c /extra | |
parent | 2d80fb918f7eacb0e3c2199eb27a4b14ab40dbf0 (diff) | |
download | mariadb-git-85da8956e62cf5a1e3ed78cb18110e3888822d09.tar.gz |
Bug #53445 Build with -Wall and fix warnings that it generates
Add -Wall to gcc/g++
Fix most warnings reported in dbg and opt mode.
cmd-line-utils/libedit/filecomplete.c:
Remove unused auto variables.
configure.cmake:
Add -Wall to gcc.
extra/comp_err.c:
Cast to correct type.
extra/perror.c:
Fix segfault (but warnings about deprecated features remain)
extra/yassl/taocrypt/include/runtime.hpp:
Comparing two literals was reported as undefined behaviour.
include/my_global.h:
Add a template for aligning character buffers.
mysys/lf_alloc-pin.c:
Initialize pointer.
sql/mysqld.cc:
Use UNINIT_VAR rather than LINT_INIT.
sql/partition_info.cc:
Use UNINIT_VAR rather than LINT_INIT.
sql/rpl_handler.cc:
Use char[] rather than unsigned long[] array for placement buffer.
sql/spatial.cc:
Use char[] rather than unsigned void*[] array for placement buffer.
sql/spatial.h:
Use char[] rather than unsigned void*[] array for placement buffer.
sql/sql_partition.cc:
Initialize auto variable.
sql/sql_table.cc:
Initialize auto variables.
Add parens around assignment within if()
sql/sys_vars.cc:
Use UNINIT_VAR.
storage/innobase/os/os0file.c:
Init first slot in auto variable.
storage/myisam/mi_create.c:
Use UNINIT_VAR rather than LINT_INIT.
storage/myisam/mi_open.c:
Remove (wrong) casting.
storage/myisam/mi_page.c:
Remove (wrong) casting.
storage/myisam/mi_search.c:
Cast to uchar* rather than char*.
strings/ctype-ucs2.c:
Use UNINIT_VAR rather than LINT_INIT.
Add (uchar*) casting.
Diffstat (limited to 'extra')
-rw-r--r-- | extra/comp_err.c | 2 | ||||
-rw-r--r-- | extra/perror.c | 2 | ||||
-rw-r--r-- | extra/yassl/taocrypt/include/runtime.hpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/extra/comp_err.c b/extra/comp_err.c index e4a07caa2ef..362533d9781 100644 --- a/extra/comp_err.c +++ b/extra/comp_err.c @@ -686,7 +686,7 @@ static ha_checksum checksum_format_specifier(const char* msg) case 'u': case 'x': case 's': - chksum= my_checksum(chksum, start, (uint) (p + 1 - start)); + chksum= my_checksum(chksum, (uchar*) start, (uint) (p + 1 - start)); start= 0; /* Not in format specifier anymore */ break; diff --git a/extra/perror.c b/extra/perror.c index d9c636ceb8c..eda0253129d 100644 --- a/extra/perror.c +++ b/extra/perror.c @@ -269,7 +269,7 @@ int main(int argc,char *argv[]) HA_ERRORS *ha_err_ptr; for (code=1 ; code < sys_nerr ; code++) { - if (sys_errlist[code][0]) + if (sys_errlist[code] && sys_errlist[code][0]) { /* Skip if no error-text */ printf("%3d = %s\n",code,sys_errlist[code]); } diff --git a/extra/yassl/taocrypt/include/runtime.hpp b/extra/yassl/taocrypt/include/runtime.hpp index 99bbe3ac8a3..b59f61a1cde 100644 --- a/extra/yassl/taocrypt/include/runtime.hpp +++ b/extra/yassl/taocrypt/include/runtime.hpp @@ -60,7 +60,7 @@ static int __cxa_pure_virtual() __attribute__((noinline, used)); static int __cxa_pure_virtual() { // oops, pure virtual called! - assert("Pure virtual method called." == "Aborted"); + assert(!"Pure virtual method called. Aborted"); return 0; } |