[llvm] r186684 - Initialize TempFileHandle.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Jul 19 13:42:42 PDT 2013


ah, ok.

I wonder if we should disable this warning. We do it for gcc, no?

On 19 July 2013 15:51, Serge Pavlov <sepavloff at gmail.com> wrote:
> 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




More information about the llvm-commits mailing list