Mail Archives: cygwin-developers/2001/10/31/07:53:38
On Sun, 2001-10-28 at 14:00, Matt wrote:
>
>
> There were a few lint wanrings I wasn't sure what to do about. The warning
> and my question:
>
> geturl.cc(95) : Warning 578: Declaration of symbol 'gw_dialog' hides
> symbol
> 'gw_dialog' (line 40)
>
> Is this intentional?
Yes but - it's confusing and should be changed. The reason things work
with this is that that function is just a message loop, line 73 is where
the real gw_dialog is set.
Long term I think this need some objectising rather than global vars,
some things would become more clear (IMNSHO).
> ----
> choose.cc(448) : Warning 533: function 'list_click(struct HWND__ *, int,
> int,
> int, unsigned int)' should return a value (see line 402)
>
> what should the return value be at the end of the function?
did list_vscroll and list_hscroll also return errors?
It looks to me like those three functions where generated by some
interface wizard. The WM_LBUTTONDOWN is documented as _requiring_ a
return code of 0 if it is processed by the application - and I suspect
the same for the HSCROLL and VSCROLL messages. (I haven't checked yet).
For now, lets leave this, and once I've checked the other two cases I
think we can get rid of the HANDLE_WM_.. macros, call the functions
directly and always return 0;
> -----
> choose.cc(911) : Warning 644: Variable 'n' (line 891) may not have been
> initialized
>
> what should initial value for n be?
It's set by the if then else in /* part 1 */
I've added a bailout clause if nothing matches which should make gcc
happy. I've also caught a parameter validation bug in the same function.
> ----
> if (src && srcsz)
> choose.cc(1488) : Warning 506: Constant value Boolean
>
> Should this be *src && *srcsz?
I think src[0] && srcsz. It's checking that there really is something to
list there.
- Raw text -