Skip to content

Commit 9d6a923

Browse files
committed
minor
1 parent 6679df2 commit 9d6a923

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ set(CMAKE_BUILD_TYPE Debug)
77
# Debug-friendly flags
88
add_compile_options(-g -O0)
99

10+
# Warning flags
11+
add_compile_options(
12+
-Wall # Enable most warnings
13+
-Wextra # Extra warnings
14+
-Wpedantic # Strict ISO C compliance
15+
-Wshadow # Warn about variable shadowing
16+
-Wformat=2 # Extra format string checks
17+
#-Wconversion # Warn about implicit conversions
18+
#-Wsign-conversion # Warn about sign conversions
19+
-Wcast-qual # Warn about cast that removes qualifiers
20+
-Wcast-align # Warn about pointer cast alignment issues
21+
-Wunused # Warn about unused variables/functions
22+
-Wdouble-promotion # Warn about float->double promotion
23+
-Wnull-dereference # Warn about null pointer dereference
24+
#-Wstrict-prototypes # Warn about missing prototypes
25+
)
26+
1027
# Include directories
1128
include_directories(${PROJECT_SOURCE_DIR}/include)
1229
include_directories(${PROJECT_SOURCE_DIR}/tests)

src/elementwise_univariate/common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,5 @@ expr *new_elementwise(expr *child)
100100
node->eval_jacobian = eval_jacobian_elementwise;
101101
node->wsum_hess_init = wsum_hess_init_elementwise;
102102
node->eval_wsum_hess = eval_wsum_hess_elementwise;
103+
return node;
103104
}

0 commit comments

Comments
 (0)