[PATCH] D77553: [Support,Windows] Tolerate failure of CryptGenRandom
Simon Tatham via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 7 01:35:52 PDT 2020
simon_tatham marked an inline comment as done.
simon_tatham added inline comments.
================
Comment at: llvm/lib/Support/Windows/Process.inc:455
+ // CryptGenRandom) don't bother at all.
+ static int x = (static_cast<void>(::srand(GetRandomNumberSeed())), 0);
+ (void)x;
----------------
hans wrote:
> Why do you need the static_cast<void>?
I must admit that I copied the idiom from the corresponding function in `unix/Process.inc` without really thinking about what the cast was doing there.
But now I look, it was added on purpose in rL261270, apparently in the expectation that at some point it would be useful for suppress a warning.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77553/new/
https://reviews.llvm.org/D77553
More information about the llvm-commits
mailing list