From e74e05fa9524a3ff581a086aee93184e4ce55b66 Mon Sep 17 00:00:00 2001 From: ddidderr Date: Fri, 8 Dec 2023 11:36:22 +0100 Subject: [PATCH] clangd warnings --- c_version/clangtest | 2 +- c_version/sudk_stack.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/c_version/clangtest b/c_version/clangtest index b7ce4e8..3da5c6d 100755 --- a/c_version/clangtest +++ b/c_version/clangtest @@ -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 diff --git a/c_version/sudk_stack.c b/c_version/sudk_stack.c index fc76b34..dba44e0 100644 --- a/c_version/sudk_stack.c +++ b/c_version/sudk_stack.c @@ -5,7 +5,7 @@ #include #include -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);