From 195e05b9dea1dd5807588787fe618dd18d447f4b Mon Sep 17 00:00:00 2001 From: Matthew Endsley Date: Mon, 14 Jan 2013 20:11:57 -0800 Subject: [PATCH] adding explicit casts to timespec intialization Fixing narrowing warnings in gcc --- include/bx/os.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/bx/os.h b/include/bx/os.h index 77a9822..9d073b8 100644 --- a/include/bx/os.h +++ b/include/bx/os.h @@ -24,7 +24,7 @@ namespace bx #if BX_PLATFORM_WINDOWS || BX_PLATFORM_XBOX360 Sleep(_ms); #else - timespec req = {_ms/1000, (_ms%1000)*1000000}; + timespec req = {(time_t)_ms/1000, (long)((_ms%1000)*1000000)}; timespec rem = {0, 0}; nanosleep(&req, &rem); #endif // BX_PLATFORM_