libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Ensure cwrapper compiles without warnings under -std=c99.


From: Charles Wilson
Subject: Re: [PATCH] Ensure cwrapper compiles without warnings under -std=c99.
Date: Tue, 06 May 2008 22:29:57 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.14) Gecko/20080421 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666

Eric Blake wrote:
According to Charles Wilson on 5/5/2008 6:23 PM:
| -# func_emit_wrapper arg
| +# func_emit_wrapper_part1 arg

Since you provide a default, I'd show that arg is optional, as in:

# func_emit_wrapper_part1 [arg=no]

Ack.

Is func_emit_wrapper_part1_arg1 even used?  Why not just delete it?

No, it is not (currently) used. However, that's just an artifact of where I happened to "split" the original emit function: it just so happens that the only place the original emit function used the *original* arg, ended up in the second half, after I split the emit function into two parts.

I figured symmetry was easier for future maintainance, than strict adherence to the rule/pattern/guideline concerning supplying only the minimum argument set to each (sub)function called.

But it doesn't matter that much to me: if you still think I should remove the superfluous argument and make the (sub) functions un-symmetric, I will.

Isn't puts slightly more efficient than printf?  But it doesn't matter
that much to me.

Not part of the scope of this patch: the old version used printf, the new version uses printf. I figured I'd get dinged for changing more than was strictly necessary to silence the observed warnings -- this was supposed to be a very simple, uncontroversial patch that could've made it in to 2.2.4...

The "out of the scope of this patch" comment also applies to /all/ of Ralf's comments on this patch, but I'll address that in a separate message.

Besides, we know that printf can deal with very large strings (because so far it is working with 4K+ ones, even if gcc -std=c99 *warns* about it. We don't know that puts() does. (It probably does, but we don't *know* that).

--
Chuck




reply via email to

[Prev in Thread] Current Thread [Next in Thread]