From 9c690eb327e65f5eb9899149b62909a783df3c16 Mon Sep 17 00:00:00 2001 From: Quinn Date: Wed, 27 Aug 2025 12:31:47 +0200 Subject: [PATCH] add NONNULL attributes to chunk deletion functions --- src/dat/mcx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dat/mcx.h b/src/dat/mcx.h index 07dd519..164d19a 100644 --- a/src/dat/mcx.h +++ b/src/dat/mcx.h @@ -15,11 +15,11 @@ struct mcx_chunk { }; /* Deletes chunk `idx` from `buf`, moving all chunks downwards in the process. */ -size_t mcx_delchunk(u8 *restrict buf, int idx); +size_t mcx_delchunk(u8 *restrict buf, int idx) NONNULL((1)); /* Deletes `chunkc` chunks specified in `chunks` from the `*.mcX` file. * This is done in a way to perform minimal memmove operations. */ -size_t mcx_delchunk_bulk(u8 *restrict buf, const u16 *restrict chunks, int chunkc); +size_t mcx_delchunk_bulk(u8 *restrict buf, const u16 *restrict chunks, int chunkc) NONNULL((1, 2)); /* Computes the byte size of the `*.mcX` file in `buf` and returns it. */ size_t mcx_calcsize(const u8 *restrict buf) NONNULL((1)) PURE;