chromium-112-gcc-13-0021-gcc-copy-list-init-net-HostCache.patch 1.1 KB

12345678910111213141516171819202122232425262728
  1. https://chromium-review.googlesource.com/c/chromium/src/+/4395935
  2. From b969f3cc2482f118819919900d0d42fe81c947e2 Mon Sep 17 00:00:00 2001
  3. From: Stephan Hartmann <stha09@googlemail.com>
  4. Date: Tue, 04 Apr 2023 16:10:52 +0000
  5. Subject: [PATCH] GCC: fix copy-list-initialization in net::HostCache
  6. absl::optional has an explicit constructor and therefore all
  7. constructors are considered on copy-list-initialization (CWG1228).
  8. Bug: 819294
  9. Change-Id: Ifce659f6a3ed072e0336b5655f2237c0613bddbe
  10. Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4395935
  11. Reviewed-by: Adam Langley <agl@chromium.org>
  12. Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
  13. Cr-Commit-Position: refs/heads/main@{#1126024}
  14. --- a/net/dns/host_cache.cc
  15. +++ b/net/dns/host_cache.cc
  16. @@ -389,7 +389,7 @@
  17. // Even if otherwise empty, having the metadata result object signifies
  18. // receiving a compatible HTTPS record.
  19. - https_record_compatibility_ = {true};
  20. + https_record_compatibility_ = std::vector<bool>{true};
  21. if (endpoint_metadatas_.value().empty())
  22. error_ = ERR_NAME_NOT_RESOLVED;