**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**


tables_metadata_digest = new_digest;
            assert(checkDigestValid(getContext()));
            ++moved_tables;
        };
        if (!table->storesDataOnDisk())
        {
            LOG_DEBUG(log, "Will DROP TABLE {}, because it does not store data on disk and can be safely dropped", backQuoteIfNeed(table_name));
            dropped_tables.push_back(tryGetTableUUID(table_name));
            dropped_dictionaries += table->isDictionary();
            table->flushAndShutdown();
            if (table->getName() == "MaterializedView" || table->getName() == "WindowView")
            {
                
                
                
                auto mv_drop_inner_table_context = make_query_context();
                table->dropInnerTableIfAny(sync, mv_drop_inner_table_context);
                mv_drop_inner_table_context->getZooKeeperMetadataTransaction()->commit();
            }
            std::lock_guard lock{metadata_mutex};
            UInt64 new_digest = tables_metadata_digest;
            new_digest -= getMetadataHash(table_name);
            DatabaseAtomic::dropTableImpl(make_query_context(), table_name,  true);
            tables_metadata_digest = new_digest;
            assert(checkDigestValid(getContext()));
        }
        else if (!table->supportsReplication())
        {
            move_table_to_database(table_name, to_db_name);
        }