On 09.09.21 16:47, Bezdeka, Florian (T RDA IOT SES-DE) wrote: > On Thu, 2021-09-09 at 09:00 +0200, Jan Kiszka wrote: >> On 09.09.21 08:55, Bezdeka, Florian via Xenomai wrote: >>> On Thu, 2021-09-09 at 11:43 +0800, rany97 via Xenomai wrote: >>>> Hi, >>>> >>>> >>>> When I run "sudo make install" to install Xenomai libraries and tools, gcc >>>> reports an error posted below: >>>> -------------------------------------------------------------------- >>>> /home/rany/build_rtos/xenomai/src/xenomai-3.1/lib/boilerplate/iniparser/iniparser.c: >>>> In function ‘iniparser_load’: >>>> /home/rany/build_rtos/xenomai/src/xenomai-3.1/lib/boilerplate/iniparser/iniparser.c:616:13: >>>> error: ‘sprintf’ arguments 3, 4 may overlap destination object ‘buf’ >>>> [-Werror=restrict] >>>> 616 | sprintf(tmp, >>>> "%s:%s", section, key); >>>> | >>>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>> cc1: all warnings being treated as errors >>>> >>>> ------------------------------------------------------------------- >>>> Shall I ignore it? >>>> >>>> ------------------------------------------------------------------- >>>> Some info lost in last mail: >>>> gcc 10.2.1 >>>> Linux debian 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 >>>> GNU/Linux >>>> Xenomai 3.1 >>>> ------------------------------------------------------------------- >>> >>> I have the same setup here, and there is no such warning. There is no >>> sprintf in iniparser.c:616. Are you sure it's Xenomai 3.1 you're >>> looking at? >>> >>> Some time ago I had to update the iniparser (from its upstream source) >>> to get rid of such compiler warnings. >>> >> >> That fix was merged into master and stable/v3.1.x long ago. You just >> need to use the latest stable release. > > Just noticed that the stable/3.0 branch still has this issue. So maybe > it was about 3.0 and not 3.1? > > @Jan > I noticed that 3.0 is broken when trying to update xenomai images to > Debian 11. IOW: 3.0 is not buildable with Debian 11. Should we apply > > 8acdbd718b78 ("lib/boilerplate/iniparser: Allow building with GCC 10.2 > 2020101") > > to stable/3.0 as well? It applies cleanly.
Done, thanks. Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux