Skip to content

Commit 388e37c

Browse files
committed
Merge #386: gen: make AccessorType static
c8ca0c0 ci: add -Wmissing-declarations to default.bash (fanquake) 641c78e ci: add -Wmissing-prototypes to LLVM config (fanquake) 52a028c gen: make AccessorType static (fanquake) Pull request description: ```bash [4/62] Building CXX object CMakeFiles/mpgen.dir/src/mp/gen.cpp.o libmultiprocess/src/mp/gen.cpp:208:13: warning: no previous prototype for function 'AccessorType' [-Wmissing-prototypes] 208 | std::string AccessorType(kj::StringPtr base_name, const Field& field) | ^ libmultiprocess/src/mp/gen.cpp:208:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 208 | std::string AccessorType(kj::StringPtr base_name, const Field& field) | ^ | static 1 warning generated. ``` Used downstream in bitcoin/bitcoin#36743. ACKs for top commit: ryanofsky: Code review ACK c8ca0c0. Since last review, just added `-Wmissing-declarations` to the GCC CI config. Thanks! Tree-SHA512: 249f93a37469b757d712467b5070fb1b2ccd09e43a799eb6bd6c8330cf7a785dfa4f34439f78d3ce426061cb522f6b366a7e33e4fda46f4398dcbe95b1ca90be
2 parents 81e5557 + c8ca0c0 commit 388e37c

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎ci/configs/default.bash‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CI_DESC="CI job using default libraries and tools, and running IWYU"
22
CI_DIR=build-default
3-
export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wundef -Wunused -Wunused-const-variable -Wextra-semi -Wmissing-noreturn -Wtrailing-whitespace"
3+
export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wundef -Wunused -Wunused-const-variable -Wextra-semi -Wmissing-declarations -Wmissing-noreturn -Wtrailing-whitespace"
44
CMAKE_ARGS=(-DMP_ENABLE_IWYU=ON)
55
BUILD_ARGS=(-k)

‎ci/configs/llvm.bash‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ CI_DESC="CI job using LLVM-based libraries and tools (clang, libc++, clang-tidy,
22
CI_DIR=build-llvm
33
NIX_ARGS=(--arg enableLibcxx true)
44
export CXX=clang++
5-
export CXXFLAGS="-Werror -Wall -Wextra -Wextra-semi -Wpedantic -Wundef -Wthread-safety -Wunused -Wunused-const-variable -Wno-c++23-lambda-attributes"
5+
export CXXFLAGS="-Werror -Wall -Wextra -Wextra-semi -Wmissing-prototypes -Wpedantic -Wundef -Wthread-safety -Wunused -Wunused-const-variable -Wno-c++23-lambda-attributes"
66
CMAKE_ARGS=(
77
-G Ninja
88
-DMP_ENABLE_CLANG_TIDY=ON

‎src/mp/gen.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ struct FieldList
205205
}
206206
};
207207

208-
std::string AccessorType(kj::StringPtr base_name, const Field& field)
208+
static std::string AccessorType(kj::StringPtr base_name, const Field& field)
209209
{
210210
const auto& f = field.param_is_set ? field.param : field.result;
211211
const auto field_name = f.getProto().getName();

0 commit comments

Comments
 (0)