RTEMS | libdebugger/rtems-debugger-*.c: Address ignored qualifier warnings (!803)

Amar Takhar (@amar) gitlab at rtems.org
Fri Oct 17 16:00:32 UTC 2025




Amar Takhar commented on a discussion on cpukit/libdebugger/rtems-debugger-aarch64.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/803#note_135137

 >    memcpy( &thread->registers[ offset ], &value, sizeof( uint64_t ) );
 >  }
 >  
 > -static const uint64_t rtems_debugger_get_int_reg(
 > +static uint64_t rtems_debugger_get_int_reg(

That's interesting and makes sense but in this scenario the only way to enforce the constness is to have a way to permanently store the value and free it later when you don't need it?  It certainly doesn't make sense to say your intent with `const` when it can't be enforced however if we're going to add docs for this scenario we should at least say what developers should be doing to enforce it if you really need to in the case of a temporary return value as in this case.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/803#note_135137
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/20251017/6ee62427/attachment-0001.htm>


More information about the bugs mailing list