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 /sql/udf_example.c | |
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 'sql/udf_example.c')
-rw-r--r-- | sql/udf_example.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/udf_example.c b/sql/udf_example.c index 82af58ec502..637293209e0 100644 --- a/sql/udf_example.c +++ b/sql/udf_example.c @@ -141,7 +141,9 @@ typedef long long longlong; #ifdef HAVE_DLOPEN +#if !defined(HAVE_GETHOSTBYADDR_R) || !defined(HAVE_SOLARIS_STYLE_GETHOST) static pthread_mutex_t LOCK_hostname; +#endif /* These must be right or mysqld will not find the symbol! */ |