RTEMS | testsuites/validation: Resolve compiler warnings and simulator failures (!1163)

Karthikey Kadati (@karthikey_kadati) gitlab at rtems.org
Tue Mar 31 20:25:22 UTC 2026




Karthikey Kadati commented on a discussion on testsuites/validation/tc-timecounter-install.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1163#note_147676

 >  
 >  static void NtpUpdateAdjustmentSlower( int64_t *adjustment, time_t *newsec )
 >  {
 > -  *adjustment = -(( (int64_t) 5000 ) << 32);
 > +  *adjustment = -( (int64_t) 5000 << 32 );

I see the confusion. My local `.c` file was already correct, but the corrupted `rtems-central` 

spec`-( (int64_t) 5000 ) << 32` overwrote it during a sync.

Because the unary minus has higher precedence than the shift, it negates the value first, which is Undefined Behavior and crashes the build. I corrected this at the core in Central some days ago. The diff appeared to be just a minor parenthesis change, but it was actually resolving that synchronization mistake and restoring the legal C logic that the generator broke.

I've since updated the YAML to exactly match the correct logic `-(( (int64_t) 5000 ) << 32)`to ensure the sync is clean, and I have removed the redundant commit to keep the history clear.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1163#note_147676
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260331/7cd829bc/attachment-0001.htm>


More information about the bugs mailing list