services: Remove an unused variable.

Frédéric Delanoy frederic.delanoy at gmail.com
Sat Aug 27 05:20:35 CDT 2011


2011/8/27 Francois Gouget <fgouget at codeweavers.com>:
> On Fri, 26 Aug 2011, Frédéric Delanoy wrote:
> [...]
>> > -        DWORD err;
>> >         const WCHAR *argv[2];
>> >         service = services_list[i];
>> >         argv[0] = service->name;
>> >         argv[1] = NULL;
>> > -        err = service_start(service, 1, argv);
>> > +        service_start(service, 1, argv);
>> >         /* FIXME: do something if the service failed to start */
>> >         release_service(service);
>> >     }
>>
>> Wouldn't it be better to do something with err rather than muting (as
>> the comment suggests)?
>
> Maybe but what? The FIXME does not even say. In the meantime a FIXME
> comment is not a good enough reason to keep a compilation warning imho.
> And conversely fixing a compilation warning is not 'muting' a FIXME
> comment.

Well what the warning complains about is not technically fixed, just hidden.
I agree warnings are bad in general, but in this very case, you don't
solve the problem (absence of error checking) but simply hide the
symptom (warning).
(You could convert the commented fixme into a real one instead)

This is no different than changing

rc = myFun1(...)
rc = myFun2(...)
ok (rc...)

into

myFun1(...)
rc = myFun2(...)
ok (rc...)

which is generally frowned upon by AJ

Frédéric



More information about the wine-devel mailing list