fix warning sign-compare and macro-redefined on Zephyr platform (#4668)

This commit is contained in:
TianlongLiang 2025-10-23 13:15:35 +08:00 committed by GitHub
parent 34c6fc94e9
commit 25c5d575a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -851,7 +851,7 @@ freebsd_floor(double x)
i0 += 1;
else {
j = i1 + (1 << (52 - j0));
if (j < i1)
if (j < (u_int32_t)i1)
i0 += 1; /* got a carry */
i1 = j;
}
@ -913,7 +913,7 @@ freebsd_ceil(double x)
i0 += 1;
else {
j = i1 + (1 << (52 - j0));
if (j < i1)
if (j < (u_int32_t)i1)
i0 += 1; /* got a carry */
i1 = j;
}
@ -1345,7 +1345,7 @@ freebsd_pow(double x, double y)
k = (iy >> 20) - 0x3ff; /* exponent */
if (k > 20) {
j = ly >> (52 - k);
if ((j << (52 - k)) == ly)
if (((u_int32_t)(j << (52 - k))) == ly)
yisint = 2 - (j & 1);
}
else if (ly == 0) {

View File

@ -290,7 +290,9 @@ typedef struct timespec os_timespec;
#define CLOCK_REALTIME 1
#endif
#ifndef CLOCK_MONOTONIC
#define CLOCK_MONOTONIC 4
#endif
static inline int
os_sched_yield(void)