RTEMS Tools | Warning in Source Generated by rtems-syms (#14)

Joel Sherrill (@joel) gitlab at rtems.org
Wed Sep 11 16:27:59 UTC 2024



Joel Sherrill created an issue: https://gitlab.rtems.org/rtems/tools/rtems-tools/-/issues/14

Assignee: Chris Johns

## Summary
These are warnings from compiling dl12. This is from a file generated by rtems-syms.

```
const rtems_rtl_tls_offset rtems_rtl_tls_offsets[] = {
};
#define RTEMS_RTL_TLS_OFFSETS_NUM (sizeof(rtems_rtl_tls_offsets) / (sizeof(rtems_rtl_tls_offsets[0])))
```

Since rtems_rtl_tls_offsets is empty, this results in these warnings.

```
/home/joel/rtems-ddci-work/rtems-ddci/build/arm/deos_arm/testsuites/libtests/dl12/dl12-sym.c: In function 'rtems_rtl_base_global_syms_init':
/home/joel/rtems-ddci-work/rtems-ddci/build/arm/deos_arm/testsuites/libtests/dl12/dl12-sym.c:1551:3: warning: array subscript 0 is outside array bounds of 'const rtems_rtl_tls_offset[0]' [-Warray-bounds=]
 1551 |   rtems_rtl_base_sym_global_add (&rtems__rtl_base_globals[0],
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1552 |                                  rtems__rtl_base_globals_size[0],
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1553 |                                  &rtems_rtl_tls_offsets[0],
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
 1554 |                                  RTEMS_RTL_TLS_OFFSETS_NUM);
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/joel/rtems-ddci-work/rtems-ddci/build/arm/deos_arm/testsuites/libtests/dl12/dl12-sym.c:1544:28: note: while referencing 'rtems_rtl_tls_offsets'
 1544 | const rtems_rtl_tls_offset rtems_rtl_tls_offsets[] = {
      |                            ^~~~~~~~~~~~~~~~~~~~~

```


## Steps to reproduce

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/tools/rtems-tools/-/issues/14
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/20240911/5e8842da/attachment.htm>


More information about the bugs mailing list