mainSavannah Administration - Support: sr #111164, libnss-mysql: multiple compiler...

 
 

sr #111164: libnss-mysql: multiple compiler warnings with gcc-14

Submitter:  Jing Luo <jing>
Submitted:  Mon 23 Dec 2024 03:42:35 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  2 - Minor Status:  None
Privacy:  Public Assigned to:  rwp
Operating System:  GNU/Linux Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 23 Dec 2024 03:42:35 PM UTC, original submission:  

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

Jing Luo <jing>
Site Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jing (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-8e77.
    Corresponding source code