Ken Takata wrote:

> After 7.4.081 static analysis with MSVC10 (Windows SDK 7.1) is supported.
> I compiled 7.4.110 with MSVC10 enabling the static analysis.  I attach the
> result of the analysis.  Maybe the most of the warnings are false positive,
> but I found some parts which should be fixed.
> 
> I fixed the following four warnings:
> c:\work\vim-msvc\src\os_win32.c(2603) : warning C6054: String 'szTrueName' =
> might not be zero-terminated: Lines: 2506, 2507, 2508, 2509, 2510, 2511, 25=
> 12, 2513, 2514, 2516, 2517, 2523, 2524, 2526, 2534, 2603
> c:\work\vim-msvc\src\os_win32.c(2599) : warning C6001: Using uninitialized =
> memory 'hFind': Lines: 2506, 2507, 2508, 2509, 2510, 2511, 2512, 2513, 2514=
> , 2516, 2517, 2523, 2524, 2526, 2534, 2537, 2540, 2541, 2542, 2544, 2542, 2=
> 546, 2550, 2551, 2552, 2560, 2599
> c:\work\vim-msvc\src\os_win32.c(2756) : warning C6054: String 'szTrueName' =
> might not be zero-terminated: Lines: 2618, 2619, 2620, 2621, 2622, 2623, 26=
> 24, 2625, 2626, 2628, 2629, 2632, 2635, 2664, 2668, 2669, 2671, 2679, 2756
> c:\work\vim-msvc\src\os_win32.c(6282) : warning C6001: Using uninitialized =
> memory 'argv': Lines: 6249, 6250, 6251, 6253, 6254, 6256, 6257, 6259, 6260,=
>  6261, 6263, 6266, 6269, 6261, 6263, 6266, 6269, 6272, 6273, 6272, 6274, 62=
> 75, 6261, 6281, 6282
> 
> Please check the attached patch.

Thanks.  However, putting a NUL in szTrueName[0] won't work when the
name starts with a drive letter.  I'll move the line to store NUL at
*ptrue out of the loop, that should work.

Ah, your second patch also handles this.  But my solution is a line
shorter :-).

> Additionally, I found one suspicious part:
> c:\work\vim-msvc\src\if_py_both.h(3008) : warning C6246: Local declaration =
> of 'todecref' hides declaration of the same name in outer scope. For additi=
> onal information, see previous declaration at line '2930' of 'c:\work\vim-m=
> svc\src\if_py_both.h': Lines: 2930
> 
> Maybe it's better to ask to ZyX.
> It seems that Py_XDECREF() is not called after the call of StringToChars() =
> in
> the line 3010.  Is it OK?

ZyX sent a patch for that.

I hope we can figure out which of the other warnings are real problems
and which are false.

-- 
How To Keep A Healthy Level Of Insanity:
14. Put mosquito netting around your work area. Play a tape of jungle
    sounds all day.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui