fix some harmless warnings with LLVM with signed vs unsigned buffer types.
This commit is contained in:
parent
a0ce598e37
commit
8562223d57
@ -52,24 +52,25 @@ static uint8_t S_table[] = {
|
||||
0x31, 0x44, 0x50, 0xB4, 0x8F, 0xED, 0x1F, 0x1A, 0xDB, 0x99, 0x8D, 0x33, 0x9F, 0x11, 0x83, 0x14
|
||||
};
|
||||
|
||||
#define UBYTES(s) ((uint8_t *) s)
|
||||
static uint8_t *padding_table[] = {
|
||||
"",
|
||||
"\x1",
|
||||
"\x2\x2",
|
||||
"\x3\x3\x3",
|
||||
"\x4\x4\x4\x4",
|
||||
"\x5\x5\x5\x5\x5",
|
||||
"\x6\x6\x6\x6\x6\x6",
|
||||
"\x7\x7\x7\x7\x7\x7\x7",
|
||||
"\x8\x8\x8\x8\x8\x8\x8\x8",
|
||||
"\x9\x9\x9\x9\x9\x9\x9\x9\x9",
|
||||
"\xa\xa\xa\xa\xa\xa\xa\xa\xa\xa",
|
||||
"\xb\xb\xb\xb\xb\xb\xb\xb\xb\xb\xb",
|
||||
"\xc\xc\xc\xc\xc\xc\xc\xc\xc\xc\xc\xc",
|
||||
"\xd\xd\xd\xd\xd\xd\xd\xd\xd\xd\xd\xd\xd",
|
||||
"\xe\xe\xe\xe\xe\xe\xe\xe\xe\xe\xe\xe\xe\xe",
|
||||
"\xf\xf\xf\xf\xf\xf\xf\xf\xf\xf\xf\xf\xf\xf\xf",
|
||||
"\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10"
|
||||
UBYTES(""),
|
||||
UBYTES("\x1"),
|
||||
UBYTES("\x2\x2"),
|
||||
UBYTES("\x3\x3\x3"),
|
||||
UBYTES("\x4\x4\x4\x4"),
|
||||
UBYTES("\x5\x5\x5\x5\x5"),
|
||||
UBYTES("\x6\x6\x6\x6\x6\x6"),
|
||||
UBYTES("\x7\x7\x7\x7\x7\x7\x7"),
|
||||
UBYTES("\x8\x8\x8\x8\x8\x8\x8\x8"),
|
||||
UBYTES("\x9\x9\x9\x9\x9\x9\x9\x9\x9"),
|
||||
UBYTES("\xa\xa\xa\xa\xa\xa\xa\xa\xa\xa"),
|
||||
UBYTES("\xb\xb\xb\xb\xb\xb\xb\xb\xb\xb\xb"),
|
||||
UBYTES("\xc\xc\xc\xc\xc\xc\xc\xc\xc\xc\xc\xc"),
|
||||
UBYTES("\xd\xd\xd\xd\xd\xd\xd\xd\xd\xd\xd\xd\xd"),
|
||||
UBYTES("\xe\xe\xe\xe\xe\xe\xe\xe\xe\xe\xe\xe\xe\xe"),
|
||||
UBYTES("\xf\xf\xf\xf\xf\xf\xf\xf\xf\xf\xf\xf\xf\xf\xf"),
|
||||
UBYTES("\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10")
|
||||
};
|
||||
|
||||
static void md2_do_chunk(struct md2_ctx *ctx, uint8_t *buf)
|
||||
|
||||
@ -233,7 +233,7 @@ void cryptonite_sha512_init_t(struct sha512_ctx *ctx, int t)
|
||||
ctx->h[i] ^= 0xa5a5a5a5a5a5a5a5ULL;
|
||||
|
||||
i = sprintf(buf, "SHA-512/%d", t);
|
||||
cryptonite_sha512_update(ctx, buf, i);
|
||||
cryptonite_sha512_update(ctx, (uint8_t *) buf, i);
|
||||
cryptonite_sha512_finalize(ctx, out);
|
||||
|
||||
/* re-init the context, otherwise len is changed */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user