add NONNULL attributes to chunk deletion functions

This commit is contained in:
2025-08-27 12:31:47 +02:00
parent af8211c5ce
commit 9c690eb327

View File

@@ -15,11 +15,11 @@ struct mcx_chunk {
}; };
/* Deletes chunk `idx` from `buf`, moving all chunks downwards in the process. */ /* 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. /* Deletes `chunkc` chunks specified in `chunks` from the `*.mcX` file.
* This is done in a way to perform minimal memmove operations. */ * 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. */ /* Computes the byte size of the `*.mcX` file in `buf` and returns it. */
size_t mcx_calcsize(const u8 *restrict buf) NONNULL((1)) PURE; size_t mcx_calcsize(const u8 *restrict buf) NONNULL((1)) PURE;