> On Feb 21, 2017, at 9:16 AM, David T. <sunfis...@yahoo.com> wrote:
> 
> 
>> On Feb 21, 2017, at 10:06 PM, John Ralls <jra...@ceridwen.us> wrote:
>> 
>> 
>>> On Feb 21, 2017, at 8:43 AM, Derek Atkins <warl...@mit.edu> wrote:
>>> 
>>> It's weird that this isn't caught by the *compiler* -- isn't an unused
>>> parameter a warning/error?
>> 
>> It is by default, but we turn it off in configure.ac lines 1570 (C++) and 
>> 1581 (C) because we have so many unused variables littering our code.
>> 
>> Regards,
>> John Ralls
> 
> John,
> 
> I’m not going to add much to this discussion, except to ask if the removal of 
> unused variables is: a) something worthy of doing, and b) something that 
> could be delegated to a non-programmer in such a way that they would not 
> *ahem* fuck things up worse? Iff both are true, then I would be willing to 
> take a stab in some way. But only if that actually helps with Real 
> Development, and doesn’t hurt the cause.

David,

Yes, cleanup would be worthwhile. It's time-consuming grunt-work.

I don't know if it's something that a non-programmer could do. It should be 
within the ability of a beginning programmer... The catch for a non-programmer 
is that there are cases where an unused variable is a function argument. Some 
functions have required argument lists even when those arguments aren't needed 
in the code at hand. In that case instead of deleting the argument you'd 
precede it with G_GNUC_UNUSED(). The difficulty for a non-programmer is in 
recognizing when to do that instead of removing the argument.

Regards,
John Ralls

_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to