Fixing some warnings

This commit is contained in:
Robert Schulze 2022-05-16 20:59:27 +02:00
parent f7de28ce4a
commit 43945cea1b
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A
28 changed files with 40 additions and 40 deletions

View File

@ -378,4 +378,4 @@ void ReplxxLineReader::enableBracketedPaste()
{
bracketed_paste_enabled = true;
rx.enable_bracketed_paste();
};
}

View File

@ -71,7 +71,7 @@ void processFile(const fs::path & file_path, const fs::path & dst_path, bool tes
dst_buf->next();
dst_buf->finalize();
}
};
}
void processTableFiles(const fs::path & data_path, fs::path dst_path, bool test_mode, bool link)

View File

@ -245,4 +245,4 @@ public:
};
};
}

View File

@ -136,4 +136,4 @@ public:
}
};
};
}

View File

@ -102,4 +102,4 @@ public:
};
};
}

View File

@ -234,4 +234,4 @@ public:
}
};
};
}

View File

@ -18,7 +18,7 @@ namespace
result += '.';
result += subkey;
return result;
};
}
}

View File

@ -14,7 +14,7 @@ bool safeFsExists(const String & path)
{
std::error_code ec;
return fs::exists(path, ec);
};
}
bool configReadClient(Poco::Util::LayeredConfiguration & config, const std::string & home_path)
{

View File

@ -48,8 +48,8 @@ public:
Exception * clone() const override { return new Exception(*this); }
void rethrow() const override { throw *this; }
const char * name() const throw() override { return "DB::Exception"; }
const char * what() const throw() override { return message().data(); }
const char * name() const noexcept override { return "DB::Exception"; }
const char * what() const noexcept override { return message().data(); }
/// Add something to the existing message.
template <typename... Args>
@ -77,7 +77,7 @@ private:
#endif
bool remote = false;
const char * className() const throw() override { return "DB::Exception"; }
const char * className() const noexcept override { return "DB::Exception"; }
};
@ -102,8 +102,8 @@ private:
int saved_errno;
std::optional<std::string> path;
const char * name() const throw() override { return "DB::ErrnoException"; }
const char * className() const throw() override { return "DB::ErrnoException"; }
const char * name() const noexcept override { return "DB::ErrnoException"; }
const char * className() const noexcept override { return "DB::ErrnoException"; }
};
@ -143,8 +143,8 @@ private:
String file_name;
mutable std::string formatted_message;
const char * name() const throw() override { return "DB::ParsingException"; }
const char * className() const throw() override { return "DB::ParsingException"; }
const char * name() const noexcept override { return "DB::ParsingException"; }
const char * className() const noexcept override { return "DB::ParsingException"; }
};

View File

@ -22,8 +22,8 @@ public:
void rethrow() const override { throw *this; }
private:
const char * name() const throw() override { return "DB::NetException"; }
const char * className() const throw() override { return "DB::NetException"; }
const char * name() const noexcept override { return "DB::NetException"; }
const char * className() const noexcept override { return "DB::NetException"; }
};
}

View File

@ -69,4 +69,4 @@ public:
size_t rulesCount() const;
};
};
}

View File

@ -401,8 +401,8 @@ public:
Exception(const Error code_, const std::string & path); /// NOLINT
Exception(const Exception & exc);
const char * name() const throw() override { return "Coordination::Exception"; }
const char * className() const throw() override { return "Coordination::Exception"; }
const char * name() const noexcept override { return "Coordination::Exception"; }
const char * className() const noexcept override { return "Coordination::Exception"; }
Exception * clone() const override { return new Exception(*this); }
const Error code;

View File

@ -35,7 +35,7 @@ static ReturnType onError(const std::string & message [[maybe_unused]], int code
throw Exception(message, code);
else
return false;
};
}
template <typename ReturnType>

View File

@ -451,7 +451,7 @@ static std::string createDirectory(const std::string & file)
return "";
fs::create_directories(path);
return path;
};
}
static bool tryCreateDirectories(Poco::Logger * logger, const std::string & path)
@ -794,7 +794,7 @@ static void addSignalHandler(const std::vector<int> & signals, signal_function h
if (out_handled_signals)
std::copy(signals.begin(), signals.end(), std::back_inserter(*out_handled_signals));
};
}
static void blockSignals(const std::vector<int> & signals)
@ -816,7 +816,7 @@ static void blockSignals(const std::vector<int> & signals)
if (pthread_sigmask(SIG_BLOCK, &sig_set, nullptr))
throw Poco::Exception("Cannot block signal.");
};
}
void BaseDaemon::initializeTerminationAndSignalProcessing()

View File

@ -24,4 +24,4 @@ namespace SentryWriter
int sig,
const std::string & error_message,
const StackTrace & stack_trace);
};
}

View File

@ -89,7 +89,7 @@ constexpr void callOnDictionaryAttributeType(AttributeUnderlyingType type, F &&
if (type == other)
func(DictionaryAttributeType<other>{});
});
};
}
struct DictionarySpecialAttribute final
{

View File

@ -9,19 +9,19 @@ using FunctionAddNanoseconds = FunctionDateOrDateTimeAddInterval<AddNanosecondsI
void registerFunctionAddNanoseconds(FunctionFactory & factory)
{
factory.registerFunction<FunctionAddNanoseconds>();
};
}
using FunctionAddMicroseconds = FunctionDateOrDateTimeAddInterval<AddMicrosecondsImpl>;
void registerFunctionAddMicroseconds(FunctionFactory & factory)
{
factory.registerFunction<FunctionAddMicroseconds>();
};
}
using FunctionAddMilliseconds = FunctionDateOrDateTimeAddInterval<AddMillisecondsImpl>;
void registerFunctionAddMilliseconds(FunctionFactory & factory)
{
factory.registerFunction<FunctionAddMilliseconds>();
};
}
}

View File

@ -1378,7 +1378,7 @@ void Context::killCurrentQuery()
{
process_list_elem->cancelQuery(true);
}
};
}
String Context::getDefaultFormat() const
{

View File

@ -75,4 +75,4 @@ void FilesystemCacheLogElement::appendToBlock(MutableColumns & columns) const
columns[i++]->insert(read_buffer_id);
}
};
}

View File

@ -58,4 +58,4 @@ class FilesystemCacheLog : public SystemLog<FilesystemCacheLogElement>
using SystemLog<FilesystemCacheLogElement>::SystemLog;
};
};
}

View File

@ -1176,7 +1176,7 @@ void addFoundRowAll(
++current_offset;
}
}
};
}
template <bool add_missing, bool need_offset>
void addNotFoundRow(AddedColumns & added [[maybe_unused]], IColumn::Offset & current_offset [[maybe_unused]])

View File

@ -203,7 +203,7 @@ static bool isTrivialSelect(const ASTPtr & select)
}
/// This query is ASTSelectWithUnionQuery subquery
return false;
};
}
Chain InterpreterInsertQuery::buildChain(
const StoragePtr & table,

View File

@ -21,4 +21,4 @@ UserDefinedExecutableFunction::UserDefinedExecutableFunction(
{
}
};
}

View File

@ -209,4 +209,4 @@ void ZooKeeperLogElement::appendToBlock(MutableColumns & columns) const
columns[i++]->insert(children_array);
}
};
}

View File

@ -32,7 +32,7 @@ static std::string createDirectory(const std::string & file)
return "";
fs::create_directories(path);
return path;
};
}
#ifdef WITH_TEXT_LOG
void Loggers::setTextLog(std::shared_ptr<DB::TextLog> log, int max_priority)

View File

@ -196,7 +196,7 @@ MergeTreeIndexConditionPtr MergeTreeIndexMinMax::createIndexCondition(
const SelectQueryInfo & query, ContextPtr context) const
{
return std::make_shared<MergeTreeIndexConditionMinMax>(index, query, context);
};
}
bool MergeTreeIndexMinMax::mayBenefitFromIndexForIn(const ASTPtr & node) const
{

View File

@ -120,4 +120,4 @@ private:
};
};
}

View File

@ -234,5 +234,5 @@ void registerStorageExecutable(StorageFactory & factory)
}, storage_features);
}
};
}