[LTP] [PATCH] sched_stress: Use time_t instead of long for type

Petr Vorel pvorel@suse.cz
Tue May 7 09:28:20 CEST 2024


> On Mon, May 6, 2024 at 2:00 PM Petr Vorel <pvorel@suse.cz> wrote:

> > Hi Khem,

> > > This ensures it works across different architectures
> > > Fixes

> > > | sched_driver.c:744:43: error: passing argument 1 of 'ctime' from
> > incompatible pointer type [-Wincompatible-pointer-types]
> > > |   744 |         printf("\nend time = %s\n", ctime(&end_time));
> > > |       |                                           ^~~~~~~~~

> > > With gcc-14

> > This was actually problem on musl, right?


> This is with 32 bit x86 using 64bit time_r this time :) we have umpteen
> ways to build systems with yocto

Thanks for info! I wonder if this is the only place where it's needed.

I'm not sure how much is sched_driver.c relevant nowadays. If yes,
it would be worth to at least fix other warnings, remove ia64 support and
#if 0.

Kind regards,
Petr

> > Anyway, thanks for the fix, merged.

> > Kind regards,
> > Petr



More information about the ltp mailing list