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. > > > Thanks, > R.
