[Bug 1894] missing a tick in _Timespec_To_ticks

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Fri Sep 2 12:58:44 UTC 2011


https://www.rtems.org/bugzilla/show_bug.cgi?id=1894

--- Comment #20 from Sebastian Huber <sebastian.huber at embedded-brains.de> 2011-09-02 07:58:42 CDT ---
The (a + b - 1) / b may lead to an integer overflow, so we should avoid this
here.  There are some integer conversion warnings in timespectoticks.c:

timespectoticks.c: In function '_Timespec_To_ticks':
timespectoticks.c:48:31: warning: conversion to 'long unsigned int' from
'time_t' may change the sign of the result [-Wsign-conversion]
timespectoticks.c:50:31: warning: conversion to 'long unsigned int' from 'long
int' may change the sign of the result [-Wsign-conversion]
timespectoticks.c:52:13: warning: conversion to 'long unsigned int' from 'long
int' may change the sign of the result [-Wsign-conversion]

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list