Skip to content

Commit b894f62

Browse files
authored
enca: fix discard-qualifier warning in enca_eol_surface() (#99)
memchr() returns void* from a const unsigned char* buffer but was assigned to a non-const unsigned char* p, discarding the const qualifier. Change p to const unsigned char* to correctly propagate constness from the buffer parameter.
1 parent d4e4e59 commit b894f62

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/guess.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ enca_eol_surface(const unsigned char *buffer,
668668
size_t size,
669669
const size_t *counts)
670670
{
671-
unsigned char *p;
671+
const unsigned char *p;
672672
size_t i;
673673

674674
/* Return BINARY when the sample contains some strange characters.

0 commit comments

Comments
 (0)