From c9730d781c33e5cbece892f78008e379cfabe2e2 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 4 Feb 2011 03:07:27 -0500 Subject: Fixed compiler warnings when building with Clang --- acprep | 3 ++- lib/utfcpp | 2 +- src/utils.cc | 4 +--- src/utils.h | 8 ++++---- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/acprep b/acprep index 381ee032..e4fbf60b 100755 --- a/acprep +++ b/acprep @@ -1131,7 +1131,8 @@ class PrepareBuild(CommandLineApp): self.configure_args.append('--enable-pch') self.LDFLAGS.append('-fpch-deps') - self.CXXFLAGS.append('-Wconversion') + if not self.options.use_clang: + self.CXXFLAGS.append('-Wconversion') #self.CXXFLAGS.append('-Wold-style-cast') system = self.get_stdout('uname', '-s') diff --git a/lib/utfcpp b/lib/utfcpp index e1100092..7875c17d 160000 --- a/lib/utfcpp +++ b/lib/utfcpp @@ -1 +1 @@ -Subproject commit e1100092ff1b6f9d0fd6af9c4f38360989f05e73 +Subproject commit 7875c17d76168b566805405c90cc34df2c364d33 diff --git a/src/utils.cc b/src/utils.cc index dce804ff..0cfe9e90 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -544,7 +544,7 @@ static inline void stream_memory_size(std::ostream& out, std::size_t size) static bool logger_has_run = false; static ptime logger_start; -bool logger_func(log_level_t level) +void logger_func(log_level_t level) { if (! logger_has_run) { logger_has_run = true; @@ -595,8 +595,6 @@ bool logger_func(log_level_t level) *_log_stream << ' ' << _log_buffer.str() << std::endl; _log_buffer.clear(); _log_buffer.str(""); - - return true; } } // namespace ledger diff --git a/src/utils.h b/src/utils.h index a228d166..002306d0 100644 --- a/src/utils.h +++ b/src/utils.h @@ -305,7 +305,7 @@ extern log_level_t _log_level; extern std::ostream * _log_stream; extern std::ostringstream _log_buffer; -bool logger_func(log_level_t level); +void logger_func(log_level_t level); #define LOGGER(cat) \ static const char * const _this_category = cat @@ -319,7 +319,7 @@ extern uint8_t _trace_level; #define TRACE(lvl, msg) \ (SHOW_TRACE(lvl) ? \ ((ledger::_log_buffer << msg), \ - ledger::logger_func(ledger::LOG_TRACE)) : false) + ledger::logger_func(ledger::LOG_TRACE)) : (void)0) #else // TRACING_ON @@ -343,7 +343,7 @@ inline bool category_matches(const char * cat) { #define DEBUG(cat, msg) \ (SHOW_DEBUG(cat) ? \ ((ledger::_log_buffer << msg), \ - ledger::logger_func(ledger::LOG_DEBUG)) : false) + ledger::logger_func(ledger::LOG_DEBUG)) : (void)0) #define DEBUG_(msg) DEBUG(_this_category, msg) #else // DEBUG_ON @@ -357,7 +357,7 @@ inline bool category_matches(const char * cat) { #define LOG_MACRO(level, msg) \ (ledger::_log_level >= level ? \ - ((ledger::_log_buffer << msg), ledger::logger_func(level)) : false) + ((ledger::_log_buffer << msg), ledger::logger_func(level)) : (void)0) #define SHOW_INFO() (ledger::_log_level >= ledger::LOG_INFO) #define SHOW_WARN() (ledger::_log_level >= ledger::LOG_WARN) -- cgit v1.2.3