1
0

fwrite_le.*: make use of const for ptr

This commit is contained in:
Intel A80486DX2-66 2024-06-18 18:15:32 +03:00
parent 71aa442035
commit 50c50db7b2
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B
2 changed files with 10 additions and 2 deletions

View File

@ -18,7 +18,11 @@
#define ifeq_b32_ret(lhs, rhs, value) if (!memcmp(lhs, rhs, 4)) return value; #define ifeq_b32_ret(lhs, rhs, value) if (!memcmp(lhs, rhs, 4)) return value;
int detect_endianness(void); int detect_endianness(void);
size_t fwrite_le(void* ptr, size_t size, size_t count, FILE* stream); size_t fwrite_le(
#if FWRITE_LE_NO_MODIFICATION
const
#endif
void* ptr, size_t size, size_t count, FILE* stream);
void reorder_le_be( void reorder_le_be(
#if FWRITE_LE_NO_MODIFICATION #if FWRITE_LE_NO_MODIFICATION
uint8_t* dest, uint8_t* src, uint8_t* dest, uint8_t* src,

View File

@ -37,7 +37,11 @@ void reorder_le_be(
} }
} }
size_t fwrite_le(void* ptr, size_t size, size_t count, FILE* stream) { size_t fwrite_le(
#if FWRITE_LE_NO_MODIFICATION
const
#endif
void* ptr, size_t size, size_t count, FILE* stream) {
/* /*
* warning: this function modifies `void* ptr` by default! * warning: this function modifies `void* ptr` by default!
* (if FWRITE_LE_NO_MODIFICATION in the header is 0) * (if FWRITE_LE_NO_MODIFICATION in the header is 0)