title: error C4996: 'ctime': This function or variable may be unsafe
body: <p>I have a large project about static source code analysis, and everything compiles successfully, except for one thing. I have provided the error message in the title. The point that confuses me is that it gives an error message saying unsafe. I thought it should be just warning, not an error. By the way, I'm using Visual Studio 2012. Here is the part of the code where I get the error, in ctime. If someone can help me overcome this error, I would be glad.</p>
  
  <pre><code>void CppCheckExecutor::reportProgress(const std::string &amp;filename, const char stage[], const std::size_t value)
  {
       (void)filename;
  
       if (!time1)
           return;
  
       // Report progress messages every 10 seconds
       const std::time_t time2 = std::time(NULL);
       if (time2 &gt;= (time1 + 10)) {
           time1 = time2;
  
           // current time in the format "Www Mmm dd hh:mm:ss yyyy"
           const std::string str(std::ctime(&amp;time2));
  
           // format a progress message
           std::ostringstream ostr;
           ostr &lt;&lt; "progress: "
                &lt;&lt; stage
                &lt;&lt; ' ' &lt;&lt; value &lt;&lt; '%';
           if (_settings-&gt;_verbose)
               ostr &lt;&lt; " time=" &lt;&lt; str.substr(11, 8);
  
           // Report progress message
           reportOut(ostr.str());
       }
  }
  </code></pre>