Skip to content

Commit 5b5dcee

Browse files
committed
fix: make sure that postject-api.h compiles without warnings
Fixes the following error I came across while integrating Postject in Node.js: ```console ../deps/postject/src/dist/postject-api.h:30:13: error: unused function 'postject_options_init' [-Werror,-Wunused-function] static void postject_options_init(struct postject_options* options) { ^ 1 error generated. ``` Refs: nodejs/node#45038 Signed-off-by: Darshan Sen <[email protected]>
1 parent c8e096a commit 5b5dcee

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

postject-api.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct postject_options {
2727
const char* pe_resource_name;
2828
};
2929

30-
static void postject_options_init(struct postject_options* options) {
30+
inline void postject_options_init(struct postject_options* options) {
3131
options->elf_section_name = NULL;
3232
options->macho_framework_name = NULL;
3333
options->macho_section_name = NULL;

test/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
cmake_minimum_required(VERSION 3.9)
22
set(CMAKE_CXX_STANDARD 11)
33

4+
set(CMAKE_CXX_FLAGS "-Wall -Werror")
5+
set(CMAKE_C_FLAGS "-Wall -Werror")
6+
47
project(postject-tests)
58

69
add_executable(c_test test.c)

0 commit comments

Comments
 (0)