From 15afa8472e1b1bbf236d4cf8e9f399345c48d3fe Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 19 Jul 2020 21:52:35 +0100 Subject: fix(3p/nix): Fix all remaining compiler warnings This compiles under `-Wall -Werror`. The largest chunk of this change is `final` qualifiers for the various Nix CLI command structs, which inherit from a Command class that has more virtual functions than are implemented by each command. Change-Id: I0925e6e1a39013f026773db5816e4a77d50f3b4a Reviewed-on: https://cl.tvl.fyi/c/depot/+/1294 Tested-by: BuildkiteCI Reviewed-by: isomer Reviewed-by: kanepyork --- third_party/nix/src/libstore/nar-info-disk-cache.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'third_party/nix/src/libstore/nar-info-disk-cache.cc') diff --git a/third_party/nix/src/libstore/nar-info-disk-cache.cc b/third_party/nix/src/libstore/nar-info-disk-cache.cc index c98882bff319..be2ad8f2dac1 100644 --- a/third_party/nix/src/libstore/nar-info-disk-cache.cc +++ b/third_party/nix/src/libstore/nar-info-disk-cache.cc @@ -49,7 +49,7 @@ create table if not exists LastPurge ( )sql"; -class NarInfoDiskCacheImpl : public NarInfoDiskCache { +class NarInfoDiskCacheImpl final : public NarInfoDiskCache { public: /* How often to purge expired entries from the cache. */ const int purgeInterval = 24 * 3600; @@ -280,8 +280,9 @@ class NarInfoDiskCacheImpl : public NarInfoDiskCache { } }; -ref getNarInfoDiskCache() { - static ref cache = make_ref(); +std::shared_ptr getNarInfoDiskCache() { + static std::shared_ptr cache = + std::make_shared(); return cache; } -- cgit 1.4.1