Skip Menu |

This queue is for tickets about the Time-HiRes CPAN distribution.

Report information
The Basics
Id: 124314
Status: open
Priority: 0/
Queue: Time-HiRes

People
Owner: Nobody in particular
Requestors: RANDIR [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Build warning on systems without some CLOCK_* constants
When building Time::HiRes as a part of perl core (but not as a stand-alone module) I get the following build warning: In file included from HiRes.xs:959: ./const-c.inc:351:42: warning: unused parameter 'iv_return' [-Wunused-parameter] constant_19 (pTHX_ const char *name, IV *iv_return) { ^ 1 warning generated. Since all three #ifdef'ed branches in constant_19 function can skip iv_return, as any of those three CLOCK_* constant may be absent in the system, I propose to add something like this: @@ -349,6 +349,7 @@ constant_15 (pTHX_ const char *name, IV *iv_return) { static int constant_19 (pTHX_ const char *name, IV *iv_return) { + PERL_UNUSED_VAR(iv_return);
On Sat Feb 03 17:52:06 2018, RANDIR wrote: Show quoted text
> When building Time::HiRes as a part of perl core (but not as a stand- > alone module) I get the following build warning: > > In file included from HiRes.xs:959: > ./const-c.inc:351:42: warning: unused parameter 'iv_return' [-Wunused- > parameter] > constant_19 (pTHX_ const char *name, IV *iv_return) { > ^ > 1 warning generated. > > Since all three #ifdef'ed branches in constant_19 function can skip > iv_return, as any of those three CLOCK_* constant may be absent in the > system, I propose to add something like this: > > @@ -349,6 +349,7 @@ constant_15 (pTHX_ const char *name, IV > *iv_return) { > > static int > constant_19 (pTHX_ const char *name, IV *iv_return) { > + PERL_UNUSED_VAR(iv_return);
The const-c.inc code is generated code, automatically generated from templates, so patching it doesn't really solve the root problem.
On Mon Feb 05 23:40:41 2018, JHI wrote: Show quoted text
> templates, > so patching it doesn't really solve the root problem.
Is it possible to add this as a prologue to each such generated function?
On Tue Feb 06 06:32:47 2018, RANDIR wrote: Show quoted text
> On Mon Feb 05 23:40:41 2018, JHI wrote:
> > templates, > > so patching it doesn't really solve the root problem.
> > Is it possible to add this as a prologue to each such generated function?
I am not aware of such a way.
On Fri Feb 16 00:21:27 2018, JHI wrote: Show quoted text
> I am not aware of such a way.
Aren't they regenerated from fallback/*.inc files? Or do you mean something else?
On Sat Feb 17 13:42:59 2018, RANDIR wrote: Show quoted text
> On Fri Feb 16 00:21:27 2018, JHI wrote:
> > I am not aware of such a way.
> > Aren't they regenerated from fallback/*.inc files? Or do you mean > something else?
Those are used only if ExtUtils::Constant is not found, which means a rather old Perl, pre-5.7.3. In 5.7.3 and newer, then ExtUtils::Constant is used, whichever version of E::U that perl has.