mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-18 05:00:48 +01:00
Fix compile errors with VS2019 v16.9.3 and GCC v7.5.0 (see issue #3140)
This commit is contained in:
parent
529b91bc6e
commit
9efd3dc8ee
@ -407,6 +407,7 @@ if(OS_WINDOWS)
|
|||||||
/wd4100 # Ignore "unreferenced formal parameter" warning
|
/wd4100 # Ignore "unreferenced formal parameter" warning
|
||||||
/wd4127 # Ignore "conditional expression is constant" warning
|
/wd4127 # Ignore "conditional expression is constant" warning
|
||||||
/wd4244 # Ignore "conversion possible loss of data" warning
|
/wd4244 # Ignore "conversion possible loss of data" warning
|
||||||
|
/wd4324 # Ignore "structure was padded due to alignment specifier" warning
|
||||||
/wd4481 # Ignore "nonstandard extension used: override" warning
|
/wd4481 # Ignore "nonstandard extension used: override" warning
|
||||||
/wd4512 # Ignore "assignment operator could not be generated" warning
|
/wd4512 # Ignore "assignment operator could not be generated" warning
|
||||||
/wd4701 # Ignore "potentially uninitialized local variable" warning
|
/wd4701 # Ignore "potentially uninitialized local variable" warning
|
||||||
|
@ -67,6 +67,15 @@
|
|||||||
#define HAS_BUILTIN(x) 0
|
#define HAS_BUILTIN(x) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// __has_feature and __has_attribute don't exist for MSVC.
|
||||||
|
#if !defined(__has_feature)
|
||||||
|
#define __has_feature(x) 0
|
||||||
|
#endif // !defined(__has_feature)
|
||||||
|
|
||||||
|
#if !defined(__has_attribute)
|
||||||
|
#define __has_attribute(x) 0
|
||||||
|
#endif // !defined(__has_attribute)
|
||||||
|
|
||||||
// Annotate a variable indicating it's ok if the variable is not used.
|
// Annotate a variable indicating it's ok if the variable is not used.
|
||||||
// (Typically used to silence a compiler warning when the assignment
|
// (Typically used to silence a compiler warning when the assignment
|
||||||
// is important for some other reason.)
|
// is important for some other reason.)
|
||||||
|
@ -21,6 +21,7 @@ bool QueryCancellationTraitsForNonCancellables(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
NOTREACHED();
|
NOTREACHED();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@ -210,7 +210,7 @@ std::string SystemErrorCodeToString(SystemErrorCode error_code) {
|
|||||||
char msgbuf[error_message_buffer_size];
|
char msgbuf[error_message_buffer_size];
|
||||||
DWORD flags = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS;
|
DWORD flags = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS;
|
||||||
DWORD len = FormatMessageA(flags, NULL, error_code, 0, msgbuf,
|
DWORD len = FormatMessageA(flags, NULL, error_code, 0, msgbuf,
|
||||||
base::size(msgbuf), NULL);
|
static_cast<DWORD>(base::size(msgbuf)), NULL);
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
if (len) {
|
if (len) {
|
||||||
std::string s(msgbuf);
|
std::string s(msgbuf);
|
||||||
|
@ -41,13 +41,24 @@ void cef_sandbox_info_destroy(void* sandbox_info) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if BUILDFLAG(IS_CEF_SANDBOX_BUILD)
|
#if BUILDFLAG(IS_CEF_SANDBOX_BUILD)
|
||||||
// Implementation from third_party/abseil-cpp/absl/types/bad_variant_access.cc
|
// Avoid bringing in absl dependencies.
|
||||||
// to avoid bringing in absl dependencies.
|
|
||||||
namespace absl {
|
namespace absl {
|
||||||
|
|
||||||
|
// From third_party/abseil-cpp/absl/types/bad_optional_access.cc
|
||||||
|
namespace optional_internal {
|
||||||
|
void throw_bad_optional_access() {
|
||||||
|
LOG(FATAL) << "Bad optional access";
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
} // namespace optional_internal
|
||||||
|
|
||||||
|
// From third_party/abseil-cpp/absl/types/bad_variant_access.cc
|
||||||
namespace variant_internal {
|
namespace variant_internal {
|
||||||
void ThrowBadVariantAccess() {
|
void ThrowBadVariantAccess() {
|
||||||
LOG(FATAL) << "Bad variant access";
|
LOG(FATAL) << "Bad variant access";
|
||||||
|
abort();
|
||||||
}
|
}
|
||||||
} // namespace variant_internal
|
} // namespace variant_internal
|
||||||
|
|
||||||
} // namespace absl
|
} // namespace absl
|
||||||
#endif // BUILDFLAG(IS_CEF_SANDBOX_BUILD)
|
#endif // BUILDFLAG(IS_CEF_SANDBOX_BUILD)
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
#include <X11/Xcursor/Xcursor.h>
|
#include <X11/Xcursor/Xcursor.h>
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "include/base/cef_cxx17_backports.h"
|
#include "include/base/cef_cxx17_backports.h"
|
||||||
#include "include/base/cef_logging.h"
|
#include "include/base/cef_logging.h"
|
||||||
#include "include/base/cef_macros.h"
|
#include "include/base/cef_macros.h"
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
#include "tests/cefclient/browser/image_cache.h"
|
#include "tests/cefclient/browser/image_cache.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "tests/shared/browser/file_util.h"
|
#include "tests/shared/browser/file_util.h"
|
||||||
#include "tests/shared/browser/resource_util.h"
|
#include "tests/shared/browser/resource_util.h"
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
#include "tests/cefclient/browser/main_context_impl.h"
|
#include "tests/cefclient/browser/main_context_impl.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "include/cef_parser.h"
|
#include "include/cef_parser.h"
|
||||||
#include "include/cef_web_plugin.h"
|
#include "include/cef_web_plugin.h"
|
||||||
#include "tests/shared/browser/client_app_browser.h"
|
#include "tests/shared/browser/client_app_browser.h"
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include "tests/cefclient/browser/test_runner.h"
|
#include "tests/cefclient/browser/test_runner.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// reserved. Use of this source code is governed by a BSD-style license that
|
// reserved. Use of this source code is governed by a BSD-style license that
|
||||||
// can be found in the LICENSE file.
|
// can be found in the LICENSE file.
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "include/base/cef_callback.h"
|
#include "include/base/cef_callback.h"
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// reserved. Use of this source code is governed by a BSD-style license that
|
// reserved. Use of this source code is governed by a BSD-style license that
|
||||||
// can be found in the LICENSE file.
|
// can be found in the LICENSE file.
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "include/base/cef_callback.h"
|
#include "include/base/cef_callback.h"
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
// can be found in the LICENSE file.
|
// can be found in the LICENSE file.
|
||||||
|
|
||||||
#include "tests/ceftests/test_util.h"
|
#include "tests/ceftests/test_util.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "include/cef_command_line.h"
|
#include "include/cef_command_line.h"
|
||||||
#include "include/cef_request_context_handler.h"
|
#include "include/cef_request_context_handler.h"
|
||||||
#include "tests/gtest/include/gtest/gtest.h"
|
#include "tests/gtest/include/gtest/gtest.h"
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// reserved. Use of this source code is governed by a BSD-style license that
|
// reserved. Use of this source code is governed by a BSD-style license that
|
||||||
// can be found in the LICENSE file.
|
// can be found in the LICENSE file.
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "include/base/cef_callback.h"
|
#include "include/base/cef_callback.h"
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include "tests/shared/browser/extension_util.h"
|
#include "tests/shared/browser/extension_util.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "include/base/cef_callback.h"
|
#include "include/base/cef_callback.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user