title: Getting a warning message with srand time null on Xcode
body: <p>Originally I just had a normal</p>
  <pre><code>srand(time(NULL));
  </code></pre>
  <p>And I was getting a warning message &quot;Implicit conversion loses integer precision: 'time_t' (aka 'long') to 'unsigned int'&quot;.</p>
  <p>I looked it up and the only solution I found was to change it to</p>
  <pre><code>srand(static_cast&lt;unsigned int&gt;(time(NULL)));
  </code></pre>
  <p>It worked temporarily, the warning message was gone. And then half a week later I opened this window again and the warning message was back.</p>
  <p><a href="https://i.stack.imgur.com/zBnuz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zBnuz.png" alt="Error with static_cast" /></a></p>
  <p><a href="https://i.stack.imgur.com/Kif04.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Kif04.png" alt="Error without static_cast" /></a></p>