mirror of
https://github.com/json-c/json-c.git
synced 2026-04-09 23:39:06 +08:00
Tell the compiler we're intentionally ignoring the return value from __sync_val_compare_and_swap().
This commit is contained in:
@@ -413,7 +413,7 @@ unsigned long lh_char_hash(const void *k)
|
|||||||
/* we can't use -1 as it is the unitialized sentinel */
|
/* we can't use -1 as it is the unitialized sentinel */
|
||||||
while ((seed = json_c_get_random_seed()) == -1);
|
while ((seed = json_c_get_random_seed()) == -1);
|
||||||
#if defined __GNUC__
|
#if defined __GNUC__
|
||||||
__sync_val_compare_and_swap(&random_seed, -1, seed);
|
(void)__sync_val_compare_and_swap(&random_seed, -1, seed);
|
||||||
#elif defined _MSC_VER
|
#elif defined _MSC_VER
|
||||||
InterlockedCompareExchange((LONG *)&random_seed, seed, -1);
|
InterlockedCompareExchange((LONG *)&random_seed, seed, -1);
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user