Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed some compile errors #15

Merged
merged 1 commit into from
Oct 28, 2012
Merged

Fixed some compile errors #15

merged 1 commit into from
Oct 28, 2012

Conversation

samitani
Copy link
Contributor

if you need, merge please.

@glicht
Copy link
Contributor

glicht commented Oct 28, 2012

Thanks for the fixes. I will review this and merge them in. Just for reference, what compiler version are you using?

@samitani
Copy link
Contributor Author

Thanks for reply. This is my environment.

mitans02@ubuntu:~$ uname -a
Linux ubuntu 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux

mitans02@ubuntu:~$ dpkg -l | grep gcc
ii gcc 4:4.4.3-1ubuntu1 The GNU C compiler
ii gcc-4.4 4.4.3-4ubuntu5 The GNU C compiler
ii gcc-4.4-base 4.4.3-4ubuntu5 The GNU Compiler Collection (base package)
ii libgcc1 1:4.4.3-4ubuntu5 GCC support library

mitans02@ubuntu:~$ g++ -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)

@samitani
Copy link
Contributor Author

This is part of error message.


libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../include -I/home/mitans02/mysql-audit/mysql-5.1.51/sql -I/home/mitans02/mysql-audit/mysql-5.1.51/include -I/home/mitans02/mysql-audit/mysql-5.1.51/regex -I/home/mitans02/mysql-audit/mysql-5.1.51 -I/home/mitans02/mysql-audit/mysql-audit/yajl/include -I/home/mitans02/mysql-audit/mysql-audit/udis86 -g -O2 -DDBUG_OFF -Werror -Wimplicit -DMYSQL_AUDIT_PLUGIN_VERSION="1.0.0" -DMYSQL_AUDIT_PLUGIN_REVISION="99999" -fno-implicit-templates -fno-exceptions -fno-rtti -MT audit_handler.lo -MD -MP -MF .deps/audit_handler.Tpo -c audit_handler.cc -fPIC -DPIC -o .libs/audit_handler.o
cc1plus: warnings being treated as errors
audit_handler.cc: In member function ‘virtual void Audit_file_handler::handler_start()’:
audit_handler.cc:203: error: format ‘%s’ expects type ‘char_’, but argument 3 has type ‘FILE_’


libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../include -I/home/mitans02/mysql-audit/mysql-5.1.51/sql -I/home/mitans02/mysql-audit/mysql-5.1.51/include -I/home/mitans02/mysql-audit/mysql-5.1.51/regex -I/home/mitans02/mysql-audit/mysql-5.1.51 -I/home/mitans02/mysql-audit/mysql-audit/yajl/include -I/home/mitans02/mysql-audit/mysql-audit/udis86 -g -O2 -DDBUG_OFF -Werror -Wimplicit -DMYSQL_AUDIT_PLUGIN_VERSION="1.0.0" -DMYSQL_AUDIT_PLUGIN_REVISION="99999" -fno-implicit-templates -fno-exceptions -fno-rtti -MT audit_plugin.lo -MD -MP -MF .deps/audit_plugin.Tpo -c audit_plugin.cc -fPIC -DPIC -o .libs/audit_plugin.o
In file included from audit_plugin.cc:20:
../include/audit_handler.h: In static member function ‘static const char* Audit_formatter::thd_query(THD_, size_t_)’:
../include/audit_handler.h:161: error: argument of type ‘uint32 (Statement::)()’ does not match ‘unsigned int’
../include/audit_handler.h:162: error: argument of type ‘char* (Statement::)()’ does not match ‘const char_’
cc1plus: warnings being treated as errors
audit_plugin.cc: In function ‘void setup_record_objs_array()’:
audit_plugin.cc:1374: error: format ‘%s’ expects type ‘char_’, but argument 4 has type ‘char ()[130]’
audit_plugin.cc: In function ‘int do_hot_patch(void__, unsigned int
, void_, void_, const char_)’:
audit_plugin.cc:1403: error: format ‘%lx’ expects type ‘long unsigned int’, but argument 4 has type ‘int’
audit_plugin.cc:1403: error: too few arguments for format
audit_plugin.cc:1408: error: format ‘%lx’ expects type ‘long unsigned int’, but argument 4 has type ‘void_’
audit_plugin.cc:1408: error: format ‘%lx’ expects type ‘long unsigned int’, but argument 5 has type ‘void_’
audit_plugin.cc:1408: error: format ‘%lx’ expects type ‘long unsigned int’, but argument 6 has type ‘void_’
audit_plugin.cc: In function ‘int audit_plugin_init(void_)’:
audit_plugin.cc:1491: error: format ‘%lx’ expects type ‘long unsigned int’, but argument 3 has type ‘void ()()’
audit_plugin.cc:1491: error: format ‘%lx’ expects type ‘long unsigned int’, but argument 4 has type ‘void

audit_plugin.cc:1499: error: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long unsigned int’
audit_plugin.cc:1505: error: format ‘%lx’ expects type ‘long unsigned int’, but argument 3 has type ‘void_’
make[1]: *** [audit_plugin.lo] Error 1
make[1]: Leaving directory `/home/mitans02/mysql-audit/mysql-audit/src'
make: *** [all-recursive] Error 1

@glicht
Copy link
Contributor

glicht commented Oct 28, 2012

Thanks for the info. I think you are getting the errors as you are using g++ to compile and we are using gcc. We use gcc for maximum compatibility with different MySQL versions and avoid forcing an import of libstdc++. Anyway, I will review the fix and merge them in so we are compatible with g++.

glicht added a commit that referenced this pull request Oct 28, 2012
Fixed some compile errors
@glicht glicht merged commit 9c01f96 into trellix-enterprise:master Oct 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants