Skip to content

Commit 9b80659

Browse files
committed
fixed warning and compilation
1 parent e08b5b2 commit 9b80659

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ set(CMAKE_C_STANDARD 11)
1010
if(MSVC)
1111
set(CMAKE_C_FLAGS_DEBUG "/W3 /Zi")
1212
else()
13-
set(CMAKE_C_FLAGS_DEBUG "-g -O0 -DDEBUG -Wall -Wextra ")
14-
set(CMAKE_C_FLAGS_RELEASE "-O3 -Wall -Wextra")
13+
set(CMAKE_C_FLAGS_DEBUG "-g -O0 -DDEBUG -Wpedantic -Werror -Wall -Wextra -Wmost")
14+
set(CMAKE_C_FLAGS_RELEASE "-O3 -Wpedantic -Werror -Wall -Wextra -Wmost")
1515
endif()
1616

1717
add_executable(test

spawn2d.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,4 +427,4 @@ uint32_t spawn2d_generate_along_spline(spawn2d_context* ctx, float* points, uint
427427
}
428428

429429
return num_points_spawned;
430-
}
430+
}

spawn2d.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,4 @@ static inline float spawn2d_rand(uint32_t *seed)
156156
}
157157
#endif
158158

159-
#endif
159+
#endif

test/test.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#include "greatest.h"
22
#include "../spawn2d.h"
3+
4+
#define _USE_MATH_DEFINES
35
#include <math.h>
46
#include <float.h>
57

@@ -271,4 +273,5 @@ int main(void)
271273
RUN_TEST(test_generate_along_spline);
272274

273275
GREATEST_MAIN_END();
274-
}
276+
}
277+

0 commit comments

Comments
 (0)