Skip to content

Commit

Permalink
fix: make sure that postject-api.h compiles without warnings
Browse files Browse the repository at this point in the history
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 <raisinten@gmail.com>
  • Loading branch information
RaisinTen committed Oct 19, 2022
1 parent c8e096a commit 5b5dcee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion postject-api.h
Expand Up @@ -27,7 +27,7 @@ struct postject_options {
const char* pe_resource_name;
};

static void postject_options_init(struct postject_options* options) {
inline void postject_options_init(struct postject_options* options) {
options->elf_section_name = NULL;
options->macho_framework_name = NULL;
options->macho_section_name = NULL;
Expand Down
3 changes: 3 additions & 0 deletions test/CMakeLists.txt
@@ -1,6 +1,9 @@
cmake_minimum_required(VERSION 3.9)
set(CMAKE_CXX_STANDARD 11)

set(CMAKE_CXX_FLAGS "-Wall -Werror")
set(CMAKE_C_FLAGS "-Wall -Werror")

project(postject-tests)

add_executable(c_test test.c)
Expand Down

0 comments on commit 5b5dcee

Please sign in to comment.