gpt4 book ai didi

swift - Realm Swift - 枚举值 'connect_timeout' 和 'bad_timestamp"未在开关中处理

转载 作者:可可西里 更新时间:2023-11-01 01:57:31 24 4
gpt4 key购买 nike

我刚刚通过 cocoapods 更新到 Xcode 9.4 (Swift 4.1) 和 Realm 3.6.0。我第一次收到编译器“语义问题”警告:

Enumeration values 'connect_timeout' and 'bad_timestamp' not handled in switch

我已经清理了构建文件夹并重新构建,但没有成功。警告仍然存在。有什么想法吗?

编辑:我应该提到警告在 Realm Framework 中。具体来说,sync_session.cpp:

switch (static_cast<ClientError>(error_code.value())) {
case ClientError::connection_closed:
case ClientError::pong_timeout:
// Not real errors, don't need to be reported to the binding.
return;
case ClientError::unknown_message:
case ClientError::bad_syntax:
case ClientError::limits_exceeded:
case ClientError::bad_session_ident:
case ClientError::bad_message_order:
case ClientError::bad_progress:
case ClientError::bad_changeset_header_syntax:
case ClientError::bad_changeset_size:
case ClientError::bad_origin_file_ident:
case ClientError::bad_server_version:
case ClientError::bad_changeset:
case ClientError::bad_request_ident:
case ClientError::bad_error_code:
case ClientError::bad_compression:
case ClientError::bad_client_version:
case ClientError::ssl_server_cert_rejected:
case ClientError::bad_file_ident:
case ClientError::bad_client_file_ident:
case ClientError::bad_client_file_ident_salt:
// Don't do anything special for these errors.
// Future functionality may require special-case handling for existing
// errors, or newly introduced error codes.
break;
}

最佳答案

尝试在“break”前加两行:

case ClientError::connect_timeout:
case ClientError::bad_timestamp:

关于swift - Realm Swift - 枚举值 'connect_timeout' 和 'bad_timestamp"未在开关中处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50709544/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com