Skip to content

Commit ed75b2a

Browse files
committed
[flang] Fix build on Darwin after llvm#92571
flang/runtime/time-intrinsic.cpp:403:19: error: comparison of integers of different signs: 'clock_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare] if (times(&tms) != -1) {
1 parent 34b4112 commit ed75b2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/runtime/time-intrinsic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ void RTNAME(Etime)(const Descriptor *values, const Descriptor *time,
400400
}
401401
#else
402402
struct tms tms;
403-
if (times(&tms) != -1) {
403+
if (times(&tms) != (clock_t)-1) {
404404
usrTime = ((double)(tms.tms_utime)) / sysconf(_SC_CLK_TCK);
405405
sysTime = ((double)(tms.tms_stime)) / sysconf(_SC_CLK_TCK);
406406
realTime = usrTime + sysTime;

0 commit comments

Comments
 (0)