mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] [PATCH] Fix signed compare warning
@ 2020-06-24 23:20 Daniel Santos
  2020-06-25 15:58 ` Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Santos @ 2020-06-24 23:20 UTC (permalink / raw)
  To: musl; +Cc: daniel, Daniel Santos

Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
---
 src/thread/__timedwait.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/thread/__timedwait.c b/src/thread/__timedwait.c
index 666093be..9829b93e 100644
--- a/src/thread/__timedwait.c
+++ b/src/thread/__timedwait.c
@@ -38,7 +38,7 @@ int __timedwait_cp(volatile int *addr, int val,
 	if (priv) priv = FUTEX_PRIVATE;
 
 	if (at) {
-		if (at->tv_nsec >= 1000000000UL) return EINVAL;
+		if ((unsigned long)at->tv_nsec >= 1000000000UL) return EINVAL;
 		if (__clock_gettime(clk, &to)) return EINVAL;
 		to.tv_sec = at->tv_sec - to.tv_sec;
 		if ((to.tv_nsec = at->tv_nsec - to.tv_nsec) < 0) {
-- 
2.24.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-04 21:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24 23:20 [musl] [PATCH] Fix signed compare warning Daniel Santos
2020-06-25 15:58 ` Khem Raj
2020-06-25 17:33   ` Rich Felker
2020-06-26  4:31   ` Daniel Santos
2020-06-26  6:26     ` Jeffrey Walton
2020-07-04 21:13       ` Daniel Santos

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).