RTEMS | cpukit/libdebugger: Fix uninitialized variable (!1275)

Wayne Thornton (@wmthornton-dev) gitlab at rtems.org
Mon Jun 1 01:14:49 UTC 2026



Merge request https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1275 was reviewed by Wayne Thornton

--
  
Wayne Thornton started a new discussion on cpukit/libdebugger/rtems-debugger-target.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1275#note_151424

 >    const rtems_id tid = thread->Object.id;
 > -  rtems_debugger_thread fake_debugger_thread;
 > +  rtems_debugger_thread fake_debugger_thread = {};

It looks to me like this was left uninitialized for a reason, be that to save CPU cycles or for portability and compliance with strict C standards. As it sits, my understanding is that using `= {}` is technically a GNU compiler extension and strict C requires an initializer thus `= {0}` otherwise an error can be thrown in non-GNU compilers. Either way, can you explain what error you were receiving that prompted this change?


-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1275
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/20260601/b0fd09c2/attachment-0001.htm>


More information about the bugs mailing list