Solve unused header warnings reported by clangd

This commit is contained in:
Robert Hensing 2024-07-12 15:37:54 +02:00
parent f070d68c32
commit 8df041cbc6
46 changed files with 53 additions and 84 deletions

View file

@ -1,7 +1,6 @@
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <climits>
#include "repl-interacter.hh"
#include "repl.hh"
@ -10,8 +9,6 @@
#include "shared.hh"
#include "config-global.hh"
#include "eval.hh"
#include "eval-cache.hh"
#include "eval-inline.hh"
#include "eval-settings.hh"
#include "attr-path.hh"
#include "signals.hh"
@ -29,6 +26,7 @@
#include "markdown.hh"
#include "local-fs-store.hh"
#include "print.hh"
#include "ref.hh"
#if HAVE_BOEHMGC
#define GC_INCLUDE_NEW

View file

@ -1,12 +1,10 @@
#include <cstring>
#include <iostream>
#include <stdexcept>
#include <string>
#include "config.hh"
#include "eval.hh"
#include "eval-gc.hh"
#include "globals.hh"
#include "util.hh"
#include "eval-settings.hh"
#include "nix_api_expr.h"

View file

@ -5,7 +5,6 @@
#include "symbol-table.hh"
#include <algorithm>
#include <optional>
namespace nix {

View file

@ -1,7 +1,5 @@
#pragma once
#include <algorithm>
#include "error.hh"
#include "pos-idx.hh"

View file

@ -2,6 +2,7 @@
///@file
#include "config.hh"
#include "ref.hh"
namespace nix {

View file

@ -1,6 +1,6 @@
#include "eval.hh"
#include "eval-gc.hh"
#include "eval-settings.hh"
#include "hash.hh"
#include "primops.hh"
#include "print-options.hh"
#include "exit.hh"
@ -16,7 +16,6 @@
#include "print.hh"
#include "filtering-source-accessor.hh"
#include "memory-source-accessor.hh"
#include "signals.hh"
#include "gc-small-vector.hh"
#include "url.hh"
#include "fetch-to-store.hh"
@ -24,7 +23,6 @@
#include "parser-tab.hh"
#include <algorithm>
#include <chrono>
#include <iostream>
#include <sstream>
#include <cstring>

View file

@ -3,21 +3,21 @@
#include "attr-set.hh"
#include "eval-error.hh"
#include "eval-gc.hh"
#include "types.hh"
#include "value.hh"
#include "nixexpr.hh"
#include "symbol-table.hh"
#include "config.hh"
#include "experimental-features.hh"
#include "position.hh"
#include "pos-table.hh"
#include "source-accessor.hh"
#include "search-path.hh"
#include "repl-exit-status.hh"
#include "ref.hh"
#include <map>
#include <optional>
#include <unordered_map>
#include <mutex>
#include <functional>
namespace nix {

View file

@ -1,5 +1,4 @@
#include "nixexpr.hh"
#include "derivations.hh"
#include "eval.hh"
#include "symbol-table.hh"
#include "util.hh"

View file

@ -6,11 +6,8 @@
#include "value.hh"
#include "symbol-table.hh"
#include "error.hh"
#include "position.hh"
#include "eval-error.hh"
#include "pos-idx.hh"
#include "pos-table.hh"
namespace nix {

View file

@ -1,10 +1,8 @@
#pragma once
#include <cinttypes>
#include <numeric>
#include <cstdint>
#include <vector>
#include "chunked-vector.hh"
#include "pos-idx.hh"
#include "position.hh"
#include "sync.hh"

View file

@ -1,4 +1,3 @@
#include "archive.hh"
#include "derivations.hh"
#include "downstream-placeholder.hh"
#include "eval-inline.hh"

View file

@ -2,7 +2,6 @@
///@file
#include <cassert>
#include <climits>
#include <span>
#include "symbol-table.hh"

View file

@ -11,6 +11,8 @@
#include <memory>
#include <nlohmann/json_fwd.hpp>
#include "ref.hh"
namespace nix { class Store; class StorePath; struct SourceAccessor; }
namespace nix::fetchers {

View file

@ -2,12 +2,10 @@
#include "fetchers.hh"
#include "cache.hh"
#include "filetransfer.hh"
#include "globals.hh"
#include "store-api.hh"
#include "archive.hh"
#include "tarfile.hh"
#include "types.hh"
#include "split.hh"
#include "store-path-accessor.hh"
#include "store-api.hh"
#include "git-utils.hh"

View file

@ -1,11 +1,12 @@
#pragma once
#include "types.hh"
#include "path.hh"
#include "hash.hh"
#include <optional>
#include "hash.hh"
#include "path.hh"
#include "ref.hh"
#include "types.hh"
namespace nix {
class Store;
struct SourceAccessor;

View file

@ -1,14 +1,12 @@
#pragma once
///@file
#include <regex>
#include "types.hh"
#include "hash.hh"
#include "fetchers.hh"
#include "outputs-spec.hh"
#include <regex>
#include <variant>
namespace nix {
class Store;

View file

@ -1,6 +1,7 @@
#include <unordered_set>
#include "lockfile.hh"
#include "store-api.hh"
#include "url-parts.hh"
#include <algorithm>
#include <iomanip>

View file

@ -8,7 +8,6 @@
#include "signals.hh"
#include <algorithm>
#include <cctype>
#include <exception>
#include <iostream>
@ -23,6 +22,7 @@
#include <openssl/crypto.h>
#include "exit.hh"
namespace nix {

View file

@ -8,13 +8,9 @@
#include "common-args.hh"
#include "path.hh"
#include "derived-path.hh"
#include "exit.hh"
#include <signal.h>
#include <locale>
namespace nix {
int handleExceptions(const std::string & programName, std::function<void()> fun);

View file

@ -14,7 +14,6 @@
#include <map>
#include <variant>
namespace nix {
struct StoreDirConfig;

View file

@ -5,6 +5,7 @@
#include "outputs-spec.hh"
#include "comparator.hh"
#include "config.hh"
#include "ref.hh"
#include <variant>

View file

@ -1,13 +1,15 @@
#pragma once
///@file
#include "types.hh"
#include "hash.hh"
#include "config.hh"
#include <string>
#include <future>
#include "logging.hh"
#include "types.hh"
#include "ref.hh"
#include "config.hh"
#include "serialise.hh"
namespace nix {
struct FileTransferSettings : Config

View file

@ -1,8 +1,9 @@
#pragma once
///@file
#include "store-api.hh"
#include <unordered_set>
#include "store-api.hh"
namespace nix {

View file

@ -1,7 +1,7 @@
#pragma once
///@file
#include "types.hh"
#include "ref.hh"
#include "store-reference.hh"
namespace nix {

View file

@ -1,3 +1,5 @@
#include <unordered_set>
#include "derivations.hh"
#include "parsed-derivations.hh"
#include "globals.hh"

View file

@ -3,7 +3,6 @@
#include <map>
#include <stack>
#include <algorithm>
#include <nlohmann/json.hpp>

View file

@ -10,7 +10,6 @@
#include "serve-protocol.hh"
#include "length-prefixed-protocol-helper.hh"
#include "store-api.hh"
namespace nix {

View file

@ -18,14 +18,10 @@
#include <nlohmann/json_fwd.hpp>
#include <atomic>
#include <limits>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <memory>
#include <string>
#include <chrono>
#include <variant>
namespace nix {

View file

@ -1,12 +1,13 @@
#include <vector>
#include <pwd.h>
#include <grp.h>
#include "user-lock.hh"
#include "file-system.hh"
#include "globals.hh"
#include "pathlocks.hh"
#include "users.hh"
#include <pwd.h>
#include <grp.h>
namespace nix {
#if __linux__

View file

@ -1,10 +1,8 @@
#pragma once
///@file
#include "types.hh"
#include <optional>
#include <memory>
#include <vector>
#include <sys/types.h>
namespace nix {

View file

@ -1,7 +1,6 @@
#pragma once
///@file
#include <iostream>
#include <functional>
#include <map>
#include <memory>
@ -11,6 +10,7 @@
#include "types.hh"
#include "experimental-features.hh"
#include "ref.hh"
namespace nix {

View file

@ -16,16 +16,12 @@
*/
#include "suggestions.hh"
#include "ref.hh"
#include "types.hh"
#include "fmt.hh"
#include <cstring>
#include <list>
#include <memory>
#include <map>
#include <optional>
#include <compare>
#include <sys/types.h>
#include <sys/stat.h>

View file

@ -2,8 +2,6 @@
///@file
#include "source-accessor.hh"
#include "fs-sink.hh"
#include "util.hh"
namespace nix {

View file

@ -1,7 +1,6 @@
#pragma once
///@file
#include "types.hh"
#include "serialise.hh"
#include "source-accessor.hh"
#include "file-system.hh"

View file

@ -1,7 +1,6 @@
#pragma once
///@file
#include "types.hh"
#include "error.hh"
#include "config.hh"

View file

@ -1,9 +1,7 @@
#pragma once
///@file
#include <compare>
#include <memory>
#include <exception>
#include <stdexcept>
namespace nix {

View file

@ -4,6 +4,7 @@
#include "canon-path.hh"
#include "hash.hh"
#include "ref.hh"
namespace nix {

View file

@ -1,7 +1,8 @@
#pragma once
///@file
#include "types.hh"
#include <limits>
#include <string>
namespace nix {
/**

View file

@ -1,12 +1,10 @@
#pragma once
///@file
#include "ref.hh"
#include <list>
#include <set>
#include <string>
#include <limits>
#include <map>
#include <variant>
#include <vector>

View file

@ -2,13 +2,11 @@
#include "derivations.hh"
#include "dotgraph.hh"
#include "globals.hh"
#include "build-result.hh"
#include "store-cast.hh"
#include "local-fs-store.hh"
#include "log-store.hh"
#include "serve-protocol.hh"
#include "serve-protocol-connection.hh"
#include "serve-protocol-impl.hh"
#include "shared.hh"
#include "graphml.hh"
#include "legacy.hh"
@ -23,12 +21,14 @@
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "build-result.hh"
#include "exit.hh"
#include "serve-protocol-impl.hh"
namespace nix_store {

View file

@ -1,6 +1,7 @@
#include <sstream>
#include "command.hh"
#include "exit.hh"
#include "logging.hh"
#include "serve-protocol.hh"
#include "shared.hh"

View file

@ -1,6 +1,8 @@
#include <unordered_set>
#include <queue>
#include "command.hh"
#include "run.hh"
#include <queue>
using namespace nix;

View file

@ -19,7 +19,6 @@
#include "users.hh"
#include <nlohmann/json.hpp>
#include <queue>
#include <iomanip>
using namespace nix;

View file

@ -1,9 +1,8 @@
#include <algorithm>
#include "args/root.hh"
#include "current-process.hh"
#include "command.hh"
#include "common-args.hh"
#include "eval-gc.hh"
#include "eval.hh"
#include "eval-settings.hh"
#include "globals.hh"

View file

@ -1,14 +1,14 @@
#include "command.hh"
#include "shared.hh"
#include "store-api.hh"
#include "sync.hh"
#include "thread-pool.hh"
#include "references.hh"
#include "signals.hh"
#include "keys.hh"
#include <atomic>
#include "exit.hh"
using namespace nix;
struct CmdVerify : StorePathsCommand

View file

@ -7,9 +7,9 @@
#include "value.hh"
#include "nixexpr.hh"
#include "eval.hh"
#include "eval-gc.hh"
#include "eval-inline.hh"
#include "eval-settings.hh"
#include "store-api.hh"
#include "tests/libstore.hh"