In file included from include/linux/bitops.h:22,
from include/log.h:15,
from include/linux/printk.h:4,
from include/common.h:20,
from lib/lz4_wrapper.c:6:
lib/lz4_wrapper.c: In function ‘ulz4fn’:
include/linux/kernel.h:184:17: warning: comparison of distinct pointer types lacks a cast
(void) (&_min1 == &_min2); \
^~
lib/lz4_wrapper.c:104:18: note: in expansion of macro ‘min’
size_t size = min((ptrdiff_t)block_size, end - out);
^~~
Signed-off-by: Pali Rohár <pali@kernel.org>
}
if (block_header & LZ4F_BLOCKUNCOMPRESSED_FLAG) {
- size_t size = min((ptrdiff_t)block_size, end - out);
+ size_t size = min((ptrdiff_t)block_size, (ptrdiff_t)(end - out));
memcpy(out, in, size);
out += size;
if (size < block_size) {