From 98b7360a965deffe5cdcfef564053609364d80b0 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Fri, 4 Sep 2020 15:23:25 +0200 Subject: [PATCH] Remove redundant static keyword for namespace-level constants Namespace-level constant objects have static storage duration by default. --- src/ccache.cpp | 6 +++--- src/compopt.cpp | 2 +- src/macroskip.hpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ccache.cpp b/src/ccache.cpp index 27676261a..090bbecd1 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -72,14 +72,14 @@ #ifndef MYNAME # define MYNAME "ccache" #endif -static const char CCACHE_NAME[] = MYNAME; +const char CCACHE_NAME[] = MYNAME; using Logging::log; using nonstd::nullopt; using nonstd::optional; using nonstd::string_view; -static const char VERSION_TEXT[] = +const char VERSION_TEXT[] = R"({} version {} Copyright (C) 2002-2007 Andrew Tridgell @@ -93,7 +93,7 @@ Foundation; either version 3 of the License, or (at your option) any later version. )"; -static const char USAGE_TEXT[] = +const char USAGE_TEXT[] = R"(Usage: {} [options] {} compiler [compiler options] diff --git a/src/compopt.cpp b/src/compopt.cpp index 4b84d8bf1..e31a1515f 100644 --- a/src/compopt.cpp +++ b/src/compopt.cpp @@ -49,7 +49,7 @@ struct compopt int type; }; -static const struct compopt compopts[] = { +const struct compopt compopts[] = { {"--Werror", TAKES_ARG}, // nvcc {"--analyze", TOO_HARD}, // Clang {"--compiler-bindir", AFFECTS_CPP | TAKES_ARG}, // nvcc diff --git a/src/macroskip.hpp b/src/macroskip.hpp index 09e705a88..f15932346 100644 --- a/src/macroskip.hpp +++ b/src/macroskip.hpp @@ -58,7 +58,7 @@ // if i % 16 == 15: // print "" -static const uint32_t macro_skip[] = { +const uint32_t macro_skip[] = { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 8, 8, 5, 2, 8, 8, 8, 4, 8, 8, 8, 3, -- 2.47.3