Compare commits

...

2 Commits

Author SHA1 Message Date
1202ae89a5
[build] user decides how to build 2023-12-08 11:37:56 +01:00
e74e05fa95
clangd warnings 2023-12-08 11:36:22 +01:00
3 changed files with 3 additions and 5 deletions

View File

@ -1,2 +0,0 @@
[build]
rustflags = ["-C", "target-cpu=native", "-C", "target-feature=+crt-static"]

View File

@ -1,6 +1,6 @@
#!/bin/bash
set -e
clang -Wall -Wextra -Weverything -Werror -O3 -march=native -flto -std=c17 -fstack-protector-all -s -o sudk_c "$1"
clang -Weverything -Wno-unsafe-buffer-usage -Werror -O3 -march=native -flto -std=c17 -fstack-protector-all -s -o sudk_c "$1"
time ./sudk_c

View File

@ -5,7 +5,7 @@
#include <stdlib.h>
#include <sys/types.h>
static inline void Print_Clear() { printf("\x1b\x5b\x48\x1b\x5b\x32\x4a"); }
static inline void Print_Clear(void) { printf("\x1b\x5b\x48\x1b\x5b\x32\x4a"); }
typedef struct Sudoku {
uint8_t *field;
@ -258,7 +258,7 @@ static void Sudoku_Free(Sudoku *s) {
s = NULL;
}
int main() {
int main(void) {
Sudoku *s = Sudoku_New(3);
Sudoku_Print(s);
Sudoku_SolveBacktracking(s);