Skip to content

Commit 0a682f1

Browse files
krajpevik
authored andcommitted
sched_stress: Use time_t instead of long for type
This fixes warnings on musl: | 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)); | | ^~~~~~~~~ Link: https://lore.kernel.org/ltp/[email protected]/ Reviewed-by: Petr Vorel <[email protected]> Signed-off-by: Khem Raj <[email protected]>
1 parent f62d2cb commit 0a682f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

testcases/kernel/sched/sched_stress/sched_driver.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ int debug = 0;
136136
/*
137137
* Function prototypes
138138
*/
139-
void startup(long);
139+
void startup(time_t);
140140
int start_testcase(char *, char *, char *, char *, char *, char *);
141141
int process_slots_in_use();
142142
int available_user_process_slots();
@@ -251,7 +251,7 @@ int main(int argc, char **argv)
251251
* information to the screen and . It also initializes the *
252252
* process id list and other global variables. *
253253
*-----------------------------------------------------------------------*/
254-
void startup(long start_time)
254+
void startup(time_t start_time)
255255
{
256256
char tempbuffer[50]; /* temporary buffer to hold names */
257257

@@ -734,7 +734,7 @@ void kill_short_term_testcases()
734734
void finishup(start_time)
735735
long start_time; /* starting time to calculate elapsed time */
736736
{
737-
long end_time; /* time when program finished */
737+
time_t end_time; /* time when program finished */
738738

739739
/*
740740
* Get the end time and calculate elapsed time; write all this out

0 commit comments

Comments
 (0)