Clang9 warning and compiler error with atomics

Okay, I’ll prepare a patch if you don’t mind.

Ok, go ahead

Best regards,
Alexey Bataev