[libc] Fix compilation issues in memory_check_utils.h
authorRoland McGrath <mcgrathr@google.com>
Thu, 25 May 2023 20:57:47 +0000 (13:57 -0700)
committerRoland McGrath <mcgrathr@google.com>
Thu, 25 May 2023 21:09:14 +0000 (14:09 -0700)
commit1d4e8f0ea66c7f623d06a4308cd99c38736173f6
tree641936aa1b233f446b49e9fba3cbd241d7c704c2
parent0e90ac9c94d716fa78e0c86a6c7f6ff24decf7fe
[libc] Fix compilation issues in memory_check_utils.h

Strict warnings require explicit static_cast to counteract
default widening of types narrower than int.

Functions in header files should have vague linkage (inline
keyword), not internal linkage (static) or external linkage
(no inline keyword) even for template functions.  Note these
don't use the LIBC_INLINE macro since this is only for test code.

Reviewed By: abrachet

Differential Revision: https://reviews.llvm.org/D151494
libc/test/src/string/memory_utils/memory_check_utils.h