summaryrefslogtreecommitdiff
path: root/clectio.c
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-28 23:01:17 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-28 23:01:17 +0200
commit8995fbbaece599f27698bdc08ab4b6fdeb685e51 (patch)
treea36b0e72425a4251ecd6bdb08775bb5f09234154 /clectio.c
parent59fc2e62cbfb94e901ac24c0d85a7bec738473e0 (diff)
downloadclectio-8995fbbaece599f27698bdc08ab4b6fdeb685e51.tar.gz
clectio-8995fbbaece599f27698bdc08ab4b6fdeb685e51.zip
clean: silence strict -Wsign-conversion / -Wunused-function
Make the build clean under -Wconversion -Wsign-conversion and -Wunused-function (beyond the Makefile's -Wall -Wextra), so it compiles warning-free on stricter setups and other compilers: size_t for the verse-index counters in load_text, a cast in the LZSS matcher, and lz_unpack marked inline (it is unused in the packer-only mktext translation unit). No behaviour change; packed output is byte-identical. Claude-Session: https://claude.ai/code/session_01S1CD1u3tgSS4xNu6WHfp5a
Diffstat (limited to 'clectio.c')
-rw-r--r--clectio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clectio.c b/clectio.c
index 7a660cb..6461e51 100644
--- a/clectio.c
+++ b/clectio.c
@@ -40,7 +40,7 @@ static long days_from_civil(long y, unsigned m, unsigned d) {
static void load_text(void) {
unsigned raw = text_lz[0] | text_lz[1] << 8 | text_lz[2] << 16 | (unsigned)text_lz[3] << 24;
- int cap = 8192, n = 0;
+ size_t cap = 8192, n = 0;
char *p;
textbuf = malloc(raw + 1);
lz_unpack(text_lz + 4, text_lz_len - 4, (unsigned char *)textbuf, raw);