[llvm] r186684 - Initialize TempFileHandle.

Serge Pavlov sepavloff at gmail.com
Fri Jul 19 12:51:14 PDT 2013


It removes complains of Visual Studio 2012. TempFileHandle is initialized
in one branch of switch statement (case FS_File). Then below in the code
TempFileHandle is used:

  if (error_code ec = UTF16ToUTF8(random_path_utf16.begin(),
                                  random_path_utf16.size(), result_path)) {
    switch (Type) {
    case FS_File:
      ::CloseHandle(TempFileHandle);

 It is again 'case FS_File' so TempFileHandle is initialized in fact, but
VS2012 compiler fais to reveal it.


2013/7/20 Rafael EspĂ­ndola <rafael.espindola at gmail.com>

> > Initialize TempFileHandle.
>
> Why? Which code path was using it uninitialized?
>
> Cheers,
> Rafael
>



-- 
Thanks,
--Serge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130720/c34ef4a5/attachment.html>


More information about the llvm-commits mailing list