**Describe the bug**
`sync` here is a pointer to a global `sync` function implicitly converted to a bool:

https://github.com/ClickHouse/ClickHouse/blob/624ccd5206a7be7c8a56f2f7590e13d57a074008/src/Databases/DatabaseReplicated.cpp#L797

**How to reproduce**
compile `master` or `v22.8.4.7-lts` with warnings enabled

**Error message and/or stacktrace**


{
    return DB::getMetadataHash(table_name, readMetadataFile(table_name));
}
void DatabaseReplicated::startupTables(ThreadPool & thread_pool, LoadingStrictnessLevel mode)
{
    DatabaseAtomic::startupTables(thread_pool, mode);
    
    UInt64 digest = 0;
    for (const auto & table : TSA_SUPPRESS_WARNING_FOR_READ(tables))
        digest += getMetadataHash(table.first);
    LOG_DEBUG(log, "Calculated metadata digest of {} tables: {}", TSA_SUPPRESS_WARNING_FOR_READ(tables).size(), digest);
    chassert(!TSA_SUPPRESS_WARNING_FOR_READ(tables_metadata_digest));
    TSA_SUPPRESS_WARNING_FOR_WRITE(tables_metadata_digest) = digest;
    ddl_worker = std::make_unique<DatabaseReplicatedDDLWorker>(this, getContext());
    if (is_probably_dropped)
        return;
    ddl_worker->startup();
}
bool DatabaseReplicated::checkDigestValid(const ContextPtr & local_context, bool debug_check ) const
{
    if (debug_check)
    {
        
        if (thread_local_rng() % 16)
            return true;
    }
    LOG_TEST(log, "Current in-memory metadata digest: {}", tables_metadata_digest);