Skip to content

Commit ed4fc3b

Browse files
committed
review: align Meson to c99 and strict flags; export SUPPORTS_* env; fix test prototype
1 parent ada9ab4 commit ed4fc3b

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

meson.build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
project('libgitledger', 'c',
22
version: '0.1.0',
3-
default_options: ['c_std=c17', 'warning_level=3', 'werror=true']
3+
default_options: ['c_std=c99', 'warning_level=3', 'werror=true']
44
)
55

66
vendor_libgit2 = get_option('vendor_libgit2')
@@ -54,6 +54,7 @@ libgitledger = static_library(
5454
include_directories: include_dir,
5555
dependencies: lib_deps,
5656
c_args: lib_c_args + ['-DGITLEDGER_BUILD'],
57+
link_args: ['-nostdlib'],
5758
)
5859

5960
tests_version = executable(

tests/error_test.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#include "gitledger/context.h"
22
#include "gitledger/error.h"
33

4+
#ifdef NDEBUG
5+
static void test_teardown_refusal_with_live_errors(void);
6+
#endif
7+
8+
49
#include <assert.h>
510
#include <stdio.h>
611
#include <stdlib.h>
@@ -170,7 +175,6 @@ int main(void)
170175
test_allocator_balance();
171176
#ifdef NDEBUG
172177
/* Release builds must refuse context teardown with live errors. */
173-
extern void test_teardown_refusal_with_live_errors(void);
174178
test_teardown_refusal_with_live_errors();
175179
#endif
176180
return 0;

tools/container/run-matrix.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ start_job() {
9999
-e RUN_TIDY="${run_tidy}" \
100100
-e LIBGITLEDGER_SUPPORTS_SANITIZERS="${supports_sanitizers}" \
101101
-e LIBGITLEDGER_SUPPORTS_ANALYZE="${supports_analyze}" \
102+
-e SUPPORTS_SANITIZERS="${supports_sanitizers}" \
103+
-e SUPPORTS_ANALYZE="${supports_analyze}" \
102104
-e LIBGITLEDGER_MATRIX_JOB="${name}" \
103105
-v "${REPO_ROOT}:/workspace:ro" \
104106
"${IMAGE_NAME}" \

0 commit comments

Comments
 (0)