fix minor pedantic warnings

This commit is contained in:
Yann Collet
2025-05-04 21:53:28 -07:00
parent 379f7eb2c8
commit 53dbf574da
2 changed files with 5 additions and 4 deletions

View File

@@ -61,15 +61,16 @@
void hash_advanced(void)
{
const char input[] = "Hello World !";
XXH3_state_t state; /* this type is part of experimental API */
XXH3_64bits_reset(&state);
const char input[] = "Hello World !";
XXH3_64bits_update(&state, input, sizeof(input));
XXH64_hash_t const h = XXH3_64bits_digest(&state);
printf("hash '%s': %08x%08x \n", input, (unsigned)(h >> 32), (unsigned)h);
{ XXH64_hash_t const h = XXH3_64bits_digest(&state);
printf("hash '%s': %08x%08x \n", input, (unsigned)(h >> 32), (unsigned)h);
}
}
int main(void)

View File

@@ -286,7 +286,7 @@ static XSUM_U64 SANITY_TEST_computeRandSeed(size_t step)
* Technically, XXH3_64bits_update is identical to XXH3_128bits_update as of
* v0.8.0, but we treat them as separate.
*/
typedef XXH_errorcode (*SANITY_TEST_XXH3_update_t)(XXH3_state_t* state, const void* input, size_t length);
typedef XXH_errorcode (*SANITY_TEST_XXH3_update_t)(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t length);
/* TODO : Share this function with xsum_sanity_check.c */