diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-07-02 15:30:47 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-07-02 15:30:47 -0300 |
commit | 93fb8bb23544a4b5b2a4a6e43e1c25d74ca9a6f0 (patch) | |
tree | 9706ada08fda4adc5e2f9cf90b41b72442c15849 /cmd-line-utils | |
parent | 6d5b440126aa44f838410c11fdf8cadb8df1e04f (diff) | |
download | mariadb-git-93fb8bb23544a4b5b2a4a6e43e1c25d74ca9a6f0.tar.gz |
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.
Diffstat (limited to 'cmd-line-utils')
-rw-r--r-- | cmd-line-utils/readline/Makefile.am | 2 | ||||
-rw-r--r-- | cmd-line-utils/readline/input.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/cmd-line-utils/readline/Makefile.am b/cmd-line-utils/readline/Makefile.am index e5f5717858d..e1e9645e238 100644 --- a/cmd-line-utils/readline/Makefile.am +++ b/cmd-line-utils/readline/Makefile.am @@ -31,7 +31,7 @@ noinst_HEADERS = readline.h chardefs.h keymaps.h \ EXTRA_DIST= emacs_keymap.c vi_keymap.c -DEFS = -DMYSQL_CLIENT_NO_THREADS -DHAVE_CONFIG_H -DNO_KILL_INTR +DEFS = -DMYSQL_CLIENT_NO_THREADS -DHAVE_CONFIG_H -DNO_KILL_INTR -D_GNU_SOURCE=1 # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/cmd-line-utils/readline/input.c b/cmd-line-utils/readline/input.c index 84c0422059a..af81d9cd3b0 100644 --- a/cmd-line-utils/readline/input.c +++ b/cmd-line-utils/readline/input.c @@ -318,7 +318,9 @@ _rl_input_available () return (_kbhit ()); #endif +#if !defined (HAVE_SELECT) return 0; +#endif } int |