configure: Enable -Wshadow.
This may be a matter of taste. I personally prefer to give variables a restricted scope, as I find this aids clarity, and -Wshadow can help prevent mistakes from this.
Merge request reports
Activity
20090 20090 check_copyable_footprints(&resource_desc, 0, sub_resource_count, base_offsets[k], 20091 20091 NULL, NULL, NULL, &total_size); 20092 20092 20093 for (l = 0; l < sub_resource_count; ++l) 20093 for (unsigned int l = 0; l < sub_resource_count; ++l) I always thought we don't like to declare variables in the
for
header, and while I don't necessarily agree with that rule I think that there is some rule in keeping things consistent.I think it was only ever forbidden because compilers choked on it, but I think compilers only ever choked on it because we had bugs in Wine preventing -std=c99 from working correctly, which have since been fixed.
I personally prefer it, myself, and in general I prefer limiting variable scopes to the blocks where they're used. I believe Henri tends to have an opposite preference, but so far I don't think he's rejected patches on those grounds.
I personally prefer it, myself, and in general I prefer limiting variable scopes to the blocks where they're used. I believe Henri tends to have an opposite preference, but so far I don't think he's rejected patches on those grounds.
I'm not sure I'd call it the opposite, but I do like to keep declarations together instead of spreading them around, yes. I also tend to think that for reasonably sized functions it doesn't make much of a difference though...