Build issues with clang

Bug #1290462 reported by Raghavendra D Prabhu on 2014-03-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Galera
Status tracked in 3.x
3.x
Medium
Alex Yurchenko
Percona XtraDB Cluster
Status tracked in 5.6
5.5
Undecided
Unassigned
5.6
Undecided
Unassigned

Bug Description

While building as scons -j8 --config=force strict_build_flags=0 libgalera_smm.so

galerautils/src/gu_mutex.c:15:1: warning: unused variable 'gu_mutex_init' [-Wunused-const-variable]
gu_mutex_init = { .target_mutex = PTHREAD_MUTEX_INITIALIZER,
^
clang -o galerautils/src/gu_backtrace.os -c -std=c99 -fno-strict-aliasing -pipe -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_backtrace.c
clang -o galerautils/src/gu_limits.os -c -std=c99 -fno-strict-aliasing -pipe -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_limits.c
clang -o galerautils/src/gu_time.os -c -std=c99 -fno-strict-aliasing -pipe -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_time.c
1 warning generated.
clang -o galerautils/src/gu_init.os -c -std=c99 -fno-strict-aliasing -pipe -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_init.c
clang -o www.evanjones.ca/crc32c.os -c -std=c99 -fno-strict-aliasing -pipe -msse4.2 -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src www.evanjones.ca/crc32c.c
clang++ -o galerautils/src/gu_vlq.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_vlq.cpp
clang++ -o galerautils/src/gu_datetime.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_datetime.cpp
clang++ -o galerautils/src/gu_exception.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_exception.cpp
clang++ -o galerautils/src/gu_logger.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_logger.cpp
clang++ -o galerautils/src/gu_prodcons.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_prodcons.cpp
clang++ -o galerautils/src/gu_regex.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_regex.cpp
clang++ -o galerautils/src/gu_string_utils.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_string_utils.cpp
clang++ -o galerautils/src/gu_uri.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_uri.cpp
clang++ -o galerautils/src/gu_buffer.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_buffer.cpp
clang++ -o galerautils/src/gu_utils++.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_utils++.cpp
clang++ -o galerautils/src/gu_config.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_config.cpp
clang++ -o galerautils/src/gu_fdesc.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_fdesc.cpp
clang++ -o galerautils/src/gu_mmap.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_mmap.cpp
clang++ -o galerautils/src/gu_alloc.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_alloc.cpp
clang++ -o galerautils/src/gu_rset.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_rset.cpp
In file included from galerautils/src/gu_config.cpp:11:
galerautils/src/gu_config.hpp:162:17: warning: no case matching constant switch condition '8'
        switch (sizeof(T))
                ^~~~~~~~~
galerautils/src/gu_config.hpp:140:16: note: in instantiation of function template specialization 'gu::Config::from_config<long>' requested here
        return from_config <T> (get(key));
               ^
galerautils/src/gu_config.cpp:329:22: note: in instantiation of function template specialization 'gu::Config::get<long>' requested here
        *val = conf->get<int64_t>(key);
                     ^
clang++ -o galerautils/src/gu_resolver.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_resolver.cpp
clang++ -o galerautils/src/gu_hexdump++.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -Wno-old-style-cast -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src galerautils/src/gu_hexdump.cpp
galerautils/src/gu_alloc.cpp:166:53: error: default initialization of an object of const type 'const gu::Allocator::BaseNameDefault' requires a user-provided default constructor
gu::Allocator::BaseNameDefault const gu::Allocator::BASE_NAME_DEFAULT;
                                                    ^
clang++ -o gcache/src/GCache_seqno.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src gcache/src/GCache_seqno.cpp
1 error generated.
scons: *** [galerautils/src/gu_alloc.os] Error 1
clang++ -o gcache/src/gcache_params.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src gcache/src/gcache_params.cpp
galerautils/src/gu_rset.cpp:339:59: warning: C++98 requires an accessible copy constructor for class 'gu::Hexdump' when binding a reference to a temporary; was private [-Wbind-to-temporary-copy]
                                << "\nfirst 4 bytes: " << gu::Hexdump(head_, 4);
                                                          ^
galerautils/src/gu_hexdump.hpp:41:5: note: declared private here
    Hexdump (const Hexdump&);
    ^
galerautils/src/gu_rset.cpp:394:38: warning: C++98 requires an accessible copy constructor for class 'gu::Hexdump' when binding a reference to a temporary; was private [-Wbind-to-temporary-copy]
                << "\ncomputed: " << gu::Hexdump(result, cs)
                                     ^
galerautils/src/gu_hexdump.hpp:41:5: note: declared private here
    Hexdump (const Hexdump&);
    ^
galerautils/src/gu_rset.cpp:395:38: warning: C++98 requires an accessible copy constructor for class 'gu::Hexdump' when binding a reference to a temporary; was private [-Wbind-to-temporary-copy]
                << "\nfound: " << gu::Hexdump(stored_checksum, cs);
                                     ^
galerautils/src/gu_hexdump.hpp:41:5: note: declared private here
    Hexdump (const Hexdump&);
    ^
In file included from gcache/src/gcache_params.cpp:5:
In file included from gcache/src/GCache.hpp:8:
In file included from gcache/src/gcache_mem_store.hpp:10:
In file included from gcache/src/gcache_memops.hpp:10:
In file included from galerautils/src/galerautils.hpp:24:
galerautils/src/gu_config.hpp:162:17: warning: no case matching constant switch condition '8'
        switch (sizeof(T))
                ^~~~~~~~~
gcache/src/gcache_params.cpp:79:40: note: in instantiation of function template specialization 'gu::Config::from_config<long>' requested here
        ssize_t tmp_size = gu::Config::from_config<ssize_t>(val);
                                       ^
3 warnings generated.
1 warning generated.
1 warning generated.
scons: building terminated because of errors.

Related branches

lp:galera
David Bennett: Pending requested 2014-07-25
Download full text (6.8 KiB)

In few other places:

=========================
gcomm/src/gcomm/conf.hpp:538:30: error: call to function 'operator>=' that is neither visible in the template definition nor found by argument-dependent lookup
        if (val < min || val >= max)
=================================

gcomm/src/gcomm/transport.hpp:59:18: warning: 'gcomm::Transport::close' hides overloaded virtual function [-Woverloaded-virtual]
    virtual void close(bool force = false) = 0;
                 ^
gcomm/src/gcomm/protolay.hpp:217:18: note: hidden overloaded virtual function 'gcomm::Protolay::close' declared here: different number of parameters (0 vs 1)
    virtual void close() { }
                 ^
clang++ -o gcomm/src/histogram.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -fno-strict-aliasing -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -Wunreachable-code -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src gcomm/src/histogram.cpp
In file included from gcomm/src/gmcast.cpp:5:
In file included from gcomm/src/gmcast.hpp:14:
gcomm/src/gcomm/transport.hpp:59:18: warning: 'gcomm::Transport::close' hides overloaded virtual function [-Woverloaded-virtual]
    virtual void close(bool force = false) = 0;
                 ^
gcomm/src/gcomm/protolay.hpp:217:18: note: hidden overloaded virtual function 'gcomm::Protolay::close' declared here: different number of parameters (0 vs 1)
    virtual void close() { }
                 ^
In file included from gcomm/src/gmcast.cpp:6:
gcomm/src/gmcast_proto.hpp:59:25: warning: will never be executed [-Wunreachable-code]
        default: return "UNKNOWN";
                        ^~~~~~~~~
clang++ -o gcomm/src/pc.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -fno-strict-aliasing -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -Wunreachable-code -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src -Igalera/src gcomm/src/pc.cpp
gcomm/src/evs_proto.cpp:2013:9: warning: will never be executed [-Wunreachable-code]
        break;
        ^~~~~
clang++ -o gcomm/src/pc_proto.os -c -Wno-long-long -Wno-deprecated -ansi -pipe -fno-strict-aliasing -g -O3 -DNDEBUG -m64 -Wall -Wextra -Wno-unused-parameter -fPIC -fcolor-diagnostics -O2 -Wall -Wunreachable-code -pthread -D_XOPEN_SOURCE=600 -DHAVE_COMMON_H -DGALERA_USE_GU_NETWORK -DHAVE_BYTESWAP_H -DHAVE_ENDIAN_H -DHAVE_BOOST_SHARED_PTR_HPP -DHAVE_TR1_UNORDERED_MAP -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG=1 -DHAVE_ASIO_HPP -DHAVE_ASIO_SSL_HPP -I. -Iasio -Icommon -Igalerautils/src -Igcomm/src -Igcomm/src/gcomm -Igcache/src -Igcs/src -Iwsdb/src...

Read more...

Alex Yurchenko (ayurchen) wrote :

Fix pushed in:
http://bazaar.launchpad.net/~codership/galera/3.x/revision/175

Note that this requires clang 3.4. clang 3.2 had utterly broken warnings.

It builds fine with strict_build_flags=0 for now.

Alex Yurchenko (ayurchen) wrote :

It should build fine even without it:
CC=clang CXX=clang++ scons -j4

With strict_build_flags=1 (the default and it enables -Werror) it fails at first warning here:

galerautils/src/gu_mutex.c:15:1: error: unused variable 'gu_mutex_init' [-Werror,-Wunused-const-variable]
gu_mutex_init = { .target_mutex = PTHREAD_MUTEX_INITIALIZER,
^

Other places where it fails:

gcs/src/gcs_act_proto.c:28:21: warning: unused variable 'PROTO_ACT_ID_OFFSET' [-Wunused-const-variable]
static const size_t PROTO_ACT_ID_OFFSET = 0;
                    ^
gcs/src/gcs_act_proto.c:29:21: warning: unused variable 'PROTO_ACT_SIZE_OFFSET' [-Wunused-const-variable]
static const size_t PROTO_ACT_SIZE_OFFSET = 8;
                    ^
gcs/src/gcs_act_proto.c:30:21: warning: unused variable 'PROTO_FRAG_NO_OFFSET' [-Wunused-const-variable]
static const size_t PROTO_FRAG_NO_OFFSET = 12;
                    ^
gcs/src/gcs_act_proto.c:34:28: warning: unused variable 'PROTO_ACT_ID_MAX' [-Wunused-const-variable]
static const gcs_seqno_t PROTO_ACT_ID_MAX = 0x00FFFFFFFFFFFFLL;
                           ^
gcs/src/gcs_act_proto.c:35:28: warning: unused variable 'PROTO_FRAG_NO_MAX' [-Wunused-const-variable]
static const unsigned int PROTO_FRAG_NO_MAX = 0xFFFFFFFF;
                           ^
gcs/src/gcs_act_proto.c:36:28: warning: unused variable 'PROTO_AT_MAX' [-Wunused-const-variable]
static const unsigned char PROTO_AT_MAX = 0xFF;

With these warnings ignored (tested with CPPFLAGS="-Wno-unused-const-variable") it builds fine.

Alex Yurchenko (ayurchen) wrote :

Ok, nothing of the kind happens in my or Teem's environments. I'm using Ubuntu 13.10 and clang-3.4.

Not sure why it is not happening on your system, but they do look like unused variables to me.

Seeing another error now:

In file included from galera/src/saved_state.cpp:5:
In file included from galera/src/saved_state.hpp:8:
galerautils/src/gu_atomic.hpp:33:32: error: cannot initialize a parameter of type 'long *' with an rvalue of type 'const long *'
            gu_atomic_set(&i_, &i);
                               ^~
galerautils/src/gu_atomic.h:55:25: note: expanded from macro 'gu_atomic_set'
    __atomic_store(ptr, vptr, GU_ATOMIC_SYNC_DEFAULT)
                        ^
galera/src/saved_state.cpp:202:13: note: in instantiation of member function 'gu::Atomic<long>::operator=' requested here
    unsafe_ = (std::numeric_limits<long>::max() >> 1);
            ^
1 error generated.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers