Building 9.1.0 resulted some warnings and a failed test

After installing Arch Linux on a new laptop, I downloaded and built the 9.1.0 release which seems to be working fine, but got this warning while running ninja

$ ninja
[1167/2480] Building C object
/home/roblaing/src/swipl-9.1.0/packages/xpce/src/unx/file.c: In function 'getBackupFileNameFile':
/home/roblaing/src/swipl-9.1.0/packages/xpce/src/unx/file.c:447:21: warning: '%s' directive writing up to 8190 bytes into a region of size between 2 and 8192 [-Wformat-overflow=]
  447 |   { sprintf(bak, "%s%s", old, ext);
      |                     ^~
In function 'backup_name',
    inlined from 'getBackupFileNameFile' at /home/roblaing/src/swipl-9.1.0/packages/xpce/src/unx/file.c:460:8:
/home/roblaing/src/swipl-9.1.0/packages/xpce/src/unx/file.c:447:5: note: 'sprintf' output between 1 and 16381 bytes into a destination of size 8192
  447 |   { sprintf(bak, "%s%s", old, ext);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2480/2480] Generating home/doc/manindex.db

Then after ctest -j 4

99% tests passed, 1 tests failed out of 77

Total Test time (real) =  24.65 sec

The following tests FAILED:
	 43 - cpp:cpp (Failed)
Errors while running CTest

Not sure if it’s due to some packages I forget to install in Arch Linux.

Thanks. This is already fixed in the git source. I should be blind though as I still think it is the compiler that is wrong rather than the (old) code. See patch 8725fef3d67c74950936e3492b87478c2dbb570a on packages/xpce

1 Like