[SSSD] [PATCH 3/4] Make DEBUG macro variadic

Nikolai Kondrashov Nikolai.Kondrashov at redhat.com
Thu Oct 17 09:23:36 UTC 2013


On 10/17/2013 12:16 PM, Nikolai Kondrashov wrote:
> On 10/15/2013 07:19 PM, Jakub Hrozek wrote:
>> On Fri, Oct 11, 2013 at 09:42:05AM -0400, Simo Sorce wrote:
>>> Finally if everybody agree they want to make this huge change, *then* I
>>> absolutely want to see each change also change debug numbers from
>>> numbers to the new macros. It makes no sense whatsoever to change the
>>> DEBUG form and leave in old debug numbers that we have been
>>> painstakingly changing little by little in the last few years.
>>>
>>> The current patch does not convert numbers to debug macros. Moreover it
>>> will not be really simple to do that in a way that will not screw up
>>> indentation / 80 columns rule, but it is up to the proponent of the huge
>>> patch to do that correctly :-) I am sure with enough dedication a script
>>> to do the correction properly can probably be made.
>>
>> If Nikolai would agree to use something like Coccinelle (and perhaps, as
>> Sumit said, compare the results), then I think we could be more certain
>> that the patch doesn't break anything.
>>
>> Moreover, we have support for detecting formatting errors (-Wformat) now
>> and all the existing warnings have been fixed.
>
> I've just tried using Coccinelle to update debug levels and it works
> beautifully.
>
> I think I'll try using Coccinelle to both make DEBUG macro invocations
> variadic and make them use the new debug levels and then apply a bit of Perl
> to restore string literals to multiple lines. This will probably be more
> reliable.
>
> I'll send new patches, if there are no objections.

Ah, my yesterday's message didn't get it through the moderation queue yet
(delayed for being too big, even compressed). I explain there that Coccinelle
sticks concatenated string literals that were on separate lines into single
lines making many of them too long and I don't know how to avoid that.

That's why I say I'll need a bit of Perl after Coccinelle above.

Sincerely,
Nick



More information about the sssd-devel mailing list