Commit cfd07ba9 authored by Niels Möller's avatar Niels Möller

Fix pointer-signedness warnings in tests.

* testsuite/testutils.c (tstring_data): Use uint8_t for data
argument.
* testsuite/testutils.h (SDATA): Use US macro to cast data
argument.
parent f2da4031
2017-09-24 Niels Möller <nisse@lysator.liu.se>
* testsuite/testutils.c (tstring_data): Use uint8_t for data
argument.
* testsuite/testutils.h (SDATA): Use US macro to cast data
argument.
2017-08-26 Niels Möller <nisse@lysator.liu.se>
* ecc-mod-inv.c (ecc_mod_inv): Add missing assert. Fixes a
......
......@@ -62,7 +62,7 @@ tstring_clear(void)
}
struct tstring *
tstring_data(size_t length, const char *data)
tstring_data(size_t length, const uint8_t *data)
{
struct tstring *s = tstring_alloc (length);
memcpy (s->data, data, length);
......
......@@ -60,7 +60,7 @@ void
tstring_clear(void);
struct tstring *
tstring_data(size_t length, const char *data);
tstring_data(size_t length, const uint8_t *data);
struct tstring *
tstring_hex(const char *hex);
......@@ -281,7 +281,7 @@ test_ecc_mul_h (unsigned curve, unsigned n, const mp_limb_t *p);
#define LDUP(x) strlen(x), strdup(x)
#define SHEX(x) (tstring_hex(x))
#define SDATA(x) ((const struct tstring *)tstring_data(LLENGTH(x), x))
#define SDATA(x) ((const struct tstring *)tstring_data(LLENGTH(x), US(x)))
#define H(x) (SHEX(x)->data)
#define MEMEQ(length, a, b) (!memcmp((a), (b), (length)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment