I couldn't agree with you more, but as is common with the mysql code
base, what should be and what is are often at odds.
I get this:
In file included from ../ndbpp/libndbpp.h:25,
from ndbj.cxx:877:
/usr/include/mysql/my_global.h:240:1: error: "inline1" is not defined
cc1plus: warnings being treated as errors
In file included from /usr/include/mysql/mysql.h:71,
from ../ndbpp/libndbpp.h:28,
from ndbj.cxx:877:
/usr/include/mysql/mysql_com.h:489: warning: redundant redeclaration of
‘my_bool my_thread_init()’ in same scope
/usr/include/mysql/my_pthread.h:641: warning: previous declaration of
‘my_bool my_thread_init()’
/usr/include/mysql/mysql_com.h:490: warning: redundant redeclaration of
‘void my_thread_end()’ in same scope
/usr/include/mysql/my_pthread.h:642: warning: previous declaration of
‘void my_thread_end()’
I have to include my_global.h for my_sys.h. And I have to include
my_sys.h to get:
charset_info_st
decimal_digit_t
I would _love_ it if there were a clean public interface to this stuff
(JD and I have been asking for one for at least 2 years and no one seems
to notice) And I just refuse to cut-and-paste the code into my code,
because that's even worse.
And in any case, it's an unclean ifdef sequence anyway.
Monty
Jonas Oreland wrote:
>
> Monty Taylor wrote:
>> #At http://bazaar.launchpad.net/~mordred/mysql-server/5.1-telco-6.2
>>
>> 2633 Monty Taylor 2008-07-16
>> BUG#38177 - Public headers prevent applications from being built with
> warnings turned on
>>
>> Fixed all of the build warnings produced by compiling a test program with:
> "-W -Wall -Wextra -std=gnu++98 -pedantic -Wundef -Wredundant-decls -Wno-long-long
> -Wno-strict-aliasing -Werror"
>> modified:
>> include/my_global.h
>> include/mysql_com.h
>> storage/ndb/include/mgmapi/mgmapi.h
>> storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp
>> storage/ndb/include/ndbapi/NdbOperation.hpp
>> storage/ndb/include/ndbapi/NdbTransaction.hpp
>
> why tamper with my_global it should not be used by application (nor be included from
> public file)
>
> /jonas
>
--
Monty Taylor, MySQL Solution Architect
Database Group, Sun Microsystems
Skype:mtaylor_mysql GPG:917E436B
4C6A 6D88 B508 C5DC BC57 ABD7 E17E F46D 917E 436B