summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/utf8proc/test/iterate.c
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2023-12-06 07:05:45 +1100
committer Vas Crabb <vas@vastheman.com>2023-12-06 07:05:45 +1100
commit466c450cb37c9077e799fe9f59137096fd35e8f6 (patch)
tree2d62bb8ecb8012a9f0d4eb75da3f4d65192c5b53 /3rdparty/utf8proc/test/iterate.c
parent12590d6ad8873bb8d8c217b67311290653d948d2 (diff)
3rdparty/utf8proc: Updated to 2.9.0.
Diffstat (limited to '3rdparty/utf8proc/test/iterate.c')
-rw-r--r--3rdparty/utf8proc/test/iterate.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/3rdparty/utf8proc/test/iterate.c b/3rdparty/utf8proc/test/iterate.c
index b8e9feb01b5..a923afdbf09 100644
--- a/3rdparty/utf8proc/test/iterate.c
+++ b/3rdparty/utf8proc/test/iterate.c
@@ -8,7 +8,7 @@ static int error;
#define CHECKVALID(pos, val, len) buf[pos] = val; testbytes(buf,len,len,__LINE__)
#define CHECKINVALID(pos, val, len) buf[pos] = val; testbytes(buf,len,UTF8PROC_ERROR_INVALIDUTF8,__LINE__)
-static void testbytes(unsigned char *buf, int len, utf8proc_ssize_t retval, int line)
+static void testbytes(utf8proc_uint8_t *buf, utf8proc_ssize_t len, utf8proc_ssize_t retval, int line)
{
utf8proc_int32_t out[16];
utf8proc_ssize_t ret;
@@ -16,13 +16,13 @@ static void testbytes(unsigned char *buf, int len, utf8proc_ssize_t retval, int
/* Make a copy to ensure that memory is left uninitialized after "len"
* bytes. This way, Valgrind can detect overreads.
*/
- unsigned char tmp[16];
- memcpy(tmp, buf, len);
+ utf8proc_uint8_t tmp[16];
+ memcpy(tmp, buf, (unsigned long int)len);
tests++;
if ((ret = utf8proc_iterate(tmp, len, out)) != retval) {
fprintf(stderr, "Failed (%d):", line);
- for (int i = 0; i < len ; i++) {
+ for (utf8proc_ssize_t i = 0; i < len ; i++) {
fprintf(stderr, " 0x%02x", tmp[i]);
}
fprintf(stderr, " -> %zd\n", ret);
@@ -32,8 +32,8 @@ static void testbytes(unsigned char *buf, int len, utf8proc_ssize_t retval, int
int main(int argc, char **argv)
{
- uint32_t byt;
- unsigned char buf[16];
+ utf8proc_int32_t byt;
+ utf8proc_uint8_t buf[16];
(void) argc; (void) argv; /* unused */