libretro / fbalpha2012_neogeo

Final Burn Alpha 2012. Port of Final Burn Alpha to Libretro (0.2.97.24). Standalone core for Neo Geo.
12 stars 30 forks source link

Build error: format not a string literal #20

Open sergiobenrocha2 opened 6 years ago

sergiobenrocha2 commented 6 years ago
+ cc -c -osrc/cpu/a68k/fba_make68k.o src/cpu/a68k/fba_make68k.c -g -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -O2 -DNDEBUG -fPIC -Wno-write-strings -DTARGET=" Neo Geo" -DNEOGEO_ONLY -DGIT_VERSION=" 0645660" -DINCLUDE_7Z_SUPPORT -DUSE_SPEEDHACKS -D__LIBRETRO__ -D__LIBRETRO_OPTIMIZATIONS__ -DWANT_NEOGEOCD -D__LIBRETRO_OPTIMIZATIONS__ -DFRONTEND_SUPPORTS_RGB565 -Isrc/burner/libretro -Isrc/burn -Isrc/cpu -Isrc/burn/snd -Isrc/burn/devices -Isrc/intf -Isrc/intf/input -Isrc/intf/cd -Isrc/burner -Isrc/cpu -Isrc/dep/libs/zlib -Isrc/dep/libs/lib7z -Isrc/burn/drv/neogeo -Isrc/dep/generated -Isrc/burner/libretro/libretro-common/include -Isrc/dep/libs
src/burn/snd/ay8910.c: In function ‘AY8910Scan’:
src/burn/snd/ay8910.c:824:28: warning: ‘%d’ directive writing between 1 and 10 bytes into a region of size 8 [-Wformat-overflow=]
   sprintf(szName, "AY8910 #%d", i);
                            ^~
src/burn/snd/ay8910.c:824:19: note: directive argument in the range [0, 2147483647]
   sprintf(szName, "AY8910 #%d", i);
                   ^~~~~~~~~~~~
In file included from /usr/include/stdio.h:862:0,
                 from src/burn/driver.h:8,
                 from src/burn/snd/ay8910.c:13:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:33:10: note: ‘__builtin___sprintf_chk’ output between 10 and 19 bytes into a destination of size 16
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       __bos (__s), __fmt, __va_arg_pack ());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/cpu/a68k/fba_make68k.c: In function ‘branchinstructions’:
src/cpu/a68k/fba_make68k.c:3607:5: error: format not a string literal and no format arguments [-Werror=format-security]
     sprintf( jmpLabel, GenerateLabel(BaseCode+0xff,1) ) ;
     ^~~~~~~
src/cpu/a68k/fba_make68k.c: In function ‘stop’:
src/cpu/a68k/fba_make68k.c:5709:3: error: format not a string literal and no format arguments [-Werror=format-security]
   sprintf(TrueLabel,GenerateLabel(0,1));
   ^~~~~~~
src/cpu/a68k/fba_make68k.c: In function ‘ReturnFromException’:
src/cpu/a68k/fba_make68k.c:5768:2: error: format not a string literal and no format arguments [-Werror=format-security]
  sprintf(TrueLabel,GenerateLabel(0,1));
  ^~~~~~~
src/cpu/a68k/fba_make68k.c: In function ‘movesr’:
src/cpu/a68k/fba_make68k.c:6310:8: error: format not a string literal and no format arguments [-Werror=format-security]
        sprintf(TrueLabel,GenerateLabel(0,1));
        ^~~~~~~

https://launchpadlibrarian.net/358224680/buildlog_ubuntu-artful-amd64.libretro-fbalpha2012-neogeo_0.2.97.29-r201802231402-0645660-3~ubuntu17.10.1_BUILDING.txt.gz

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/56755842-build-error-format-not-a-string-literal?utm_campaign=plugin&utm_content=tracker%2F20402903&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F20402903&utm_medium=issues&utm_source=github).