URL: <https://savannah.nongnu.org/support/?111164>
Summary: libnss-mysql: multiple compiler warnings with gcc-14
Group: Savannah Administration
Submitter: jing
Submitted: Tue 24 Dec 2024 12:42:35 AM JST
Category: None
Priority: 5 - Normal
Severity: 2 - Minor
Status: None
Privacy: Public
Assigned to: rwp
Originator Email:
Operating System: GNU/Linux
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Tue 24 Dec 2024 12:42:35 AM JST By: Jing Luo <jing>
so there are a few compiler warnings if the source is built with gcc-14, with
:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time
-D_FORTIFY_SOURCE=2 -D_REENTRANT -g -O2 -Werror=implicit-function-declaration
-Werror=array-bounds -Werror=clobbered -Werror=volatile-register-var
-ffile-prefix-map=/builds/debian/libnss-mysql/debian/output/source_dir=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -Wall -I/usr/include/mariadb
-I/usr/include/mariadb/mysql -c nss_config.c -fPIC -DPIC -o
.libs/nss_config.o
nss_config.c: In function '_nss_mysql_load_config_file':
nss_config.c:85:11: warning: '__builtin_strncpy' output may be truncated
copying 128 bytes from a string of length 1023 [-Wstringop-truncation]
85 | strncpy (key, cur, key_size);
| ^
...
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time
-D_FORTIFY_SOURCE=2 -D_REENTRANT -g -O2 -Werror=implicit-function-declaration
-Werror=array-bounds -Werror=clobbered -Werror=volatile-register-var
-ffile-prefix-map=/builds/debian/libnss-mysql/debian/output/source_dir=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -Wall -I/usr/include/mariadb
-I/usr/include/mariadb/mysql -c mysql.c -fPIC -DPIC -o .libs/mysql.o
...
mysql.c: In function '_nss_mysql_connect_sql':
mysql.c:220:7: warning: the comparison will always evaluate as 'true' for the
address of 'port' will never be NULL [-Waddress]
220 | if (server->port)
| ^~~~~~
In file included from mysql.c:24:
nss_mysql.h:212:8: note: 'port' declared here
212 | char port[MAX_VAL_SIZE]; /* SQL port to connect to */
| ^~~~
A copy of the full buildlog is here, along with source and amd64 binary
package: mgt1.sv.gnu.org:/home/guthib
alternatively, debian's gitlab-runner ci pipeline log:
https://salsa.debian.org/debian/libnss-mysql/-/jobs/6781019
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/support/?111164>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
signature.asc
Description: PGP signature
