squiggle.c

Self-contained Monte Carlo estimation in C99
Log | Files | Refs | README

commit 827fa3823b6298ddc8824bb2590b71ed0586ab65
parent 0c22716635e1261a0cf24ff8516410140851adc7
Author: NunoSempere <nuno.sempere@protonmail.com>
Date:   Sat, 19 Aug 2023 19:18:02 +0200

add clang-tidy to check for possible errors.

Diffstat:
Aexamples/00_example_template/example | 0
Mmakefile | 2++
Msquiggle.c | 2+-
3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/00_example_template/example b/examples/00_example_template/example Binary files differ. diff --git a/makefile b/makefile @@ -17,3 +17,5 @@ format: squiggle.c squiggle.h $(FORMATTER) squiggle.c $(FORMATTER) squiggle.h +lint: + clang-tidy squiggle.c -- -lm diff --git a/squiggle.c b/squiggle.c @@ -217,7 +217,7 @@ struct box process_error(const char* error_msg, int should_exit, char* file, int exit(1); } else { char error_msg[MAX_ERROR_LENGTH]; - snprintf(error_msg, MAX_ERROR_LENGTH, "@, in %s (%d)", file, line); + snprintf(error_msg, MAX_ERROR_LENGTH, "@, in %s (%d)", file, line); // NOLINT: We are being carefull here by considering MAX_ERROR_LENGTH explicitly. struct box error = { .empty = 1, .error_msg = error_msg }; return error; }