diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-07-21 18:06:31 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-07-21 18:06:31 +0200 |
| commit | a6e3e5aaf3af1fa05bc54b793f45d66b3e3f4a05 (patch) | |
| tree | b1ccb3c0daabb21a75cea6273fe1282b579e9cba | |
| parent | 0be32393e54bed6bbf5890edba72b8808d276289 (diff) | |
fix: Fix some warnings
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | string.h | 3 | ||||
| -rw-r--r-- | testing.h | 4 |
3 files changed, 5 insertions, 4 deletions
@@ -9,7 +9,7 @@ - Benchmark 1MB file - More modern include pragma (once) - File structure -- Ignore some errors +- Static functions for private? ## Resources @@ -6,7 +6,8 @@ #ifndef STRING_H #define STRING_H -#define S(s) (Str){s, sizeof(s) - 1} +#define S(s) \ + (Str) { s, lengthof(s) } typedef struct { byte *data; size len; @@ -10,7 +10,7 @@ #define t_assert_equal(a, b) \ if (!(a == b)) { \ fprintf(stderr, \ - "Assertion failed: %d (%s) != %d (%s) at %s:%d in %s()\n", a, \ - #a, b, #b, __FILE__, __LINE__, __func__); \ + "Assertion failed: %d (%s) != %d (%s) at %s:%d in %s()\n", \ + (int)a, #a, (int)b, #b, __FILE__, __LINE__, __func__); \ return 1; \ } |
