mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-02-04 12:41:34 +00:00
testsuites/.../tc-timecounter-install.c: Address << of negative value
This change was made to address GCC -Wshift-negative-value. Shifting a negative value is undefined in the C programming language because one's and two's complement representations give different results. Closes #5385.
This commit is contained in:
@@ -353,7 +353,7 @@ static void NtpUpdateAdjustmentFaster( int64_t *adjustment, time_t *newsec )
|
||||
|
||||
static void NtpUpdateAdjustmentSlower( int64_t *adjustment, time_t *newsec )
|
||||
{
|
||||
*adjustment = -( (int64_t) 5000 ) << 32;
|
||||
*adjustment = -(( (int64_t) 5000 ) << 32);
|
||||
(void) newsec;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user