🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90350

Re: INN 2.7.1 Compile warning in cnfs.c

#90350
From: The Doctor
Date: Sat, 13 May 2023 05:59
51 lines
3381 bytes
In article <u3mifn$1mpp$1@nnrp.usenet.blueworldhosting.com>,
Jesse Rehmer  <jesse.rehmer@blueworldhosting.com> wrote:
>Spinning up a new server to convert tradspool to CNFS and notice the following
>compile time warning when building INN 2.7.1. I do not recall seeing this when
>building 2.7.0 (but it's been awhile). Running "make tests" results in all
>tests successfully passing.
>
>Build environment:
>
>[news@gatekeeper ~/src/inn-2.7.1]$ uname -ar
>FreeBSD gatekeeper 13.2-RELEASE FreeBSD 13.2-RELEASE
>releng/13.2-n254617-525ecfdad597 GENERIC amd64
>
>[news@gatekeeper ~/src/inn-2.7.1]$ gcc --version
>gcc (FreeBSD Ports Collection) 12.2.0
>Copyright (C) 2022 Free Software Foundation, Inc.
>This is free software; see the source for copying conditions.  There is NO
>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
>Configure command:
>
>./configure --mandir=/usr/local/man --prefix=/usr/local/news
>--with-spool-dir=/usr/local/news/spool --with-log-dir=/var/log/news
>--with-tmp-dir=/usr/local/news/tmp --sysconfdir=/usr/local/news/etc
>--with-run-dir=/usr/local/news/run --with-db-dir=/usr/local/news/db
>--datarootdir=/usr/local/news/share --with-perl --with-blacklist
>--with-sqlite3=/usr/local --with-bdb --with-bdb-lib=/usr/local/lib/db18
>--with-bdb-include=/usr/local/include/db18 --without-krb5 --enable-keywords
>--enable-largefiles --with-python --with-openssl=/usr
>
>Warning exhibited:
>
>../libtool --mode=compile gcc -g -O2 -fPIE -D_FORTIFY_SOURCE=2
>-fstack-protector-strong -I../include -I. -I/usr/local/include/db18 
>-I/usr/local/include -c -o cnfs/cnfs.o cnfs/cnfs.c
>libtool: compile: gcc -g -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-strong
>-I../include -I. -I/usr/local/include/db18 -I/usr/local/include -c cnfs/cnfs.c
> -fPIC -DPIC -o cnfs/.libs/cnfs.o
>In function 'CNFS_setcurrent',
>    inlined from 'cnfs_init' at cnfs/cnfs.c:1211:17:
>cnfs/cnfs.c:814:13: warning: 'strncpy' specified bound 16 equals destination
>size [-Wstringop-truncation]
>  814 |             strncpy(cycbuff->metaname, metacycbuff->name, CNFSNASIZ);
>      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Why are you not using clang?
-- 
Member - Liberal International This is doctor@nk.ca Ici doctor@nk.ca
Yahweh, King & country!Never Satan President Republic!Beware AntiChrist rising!
Look at Psalms 14 and 53 on Atheism https://www.empire.kred/ROOTNK?t=94a1f39b 
Alberta 29 May 2023 boot out the UCP and the NDP!  Beware https://mindspring.com
Technical Details
Message-ID: <u3n8vj$2m01$24@gallifrey.nk.ca>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <u3mifn$1mpp$1@nnrp.usenet.blueworldhosting.com>

Show Full Headers
Complete Article Headers
Message-ID: <u3n8vj$2m01$24@gallifrey.nk.ca>
Subject: Re: INN 2.7.1 Compile warning in cnfs.c
Date: Sat, 13 May 2023 05:59:15 +0000
From: doctor@doctor.nl2k.ab.ca (The Doctor)
References: <u3mifn$1mpp$1@nnrp.usenet.blueworldhosting.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: NetKnow News
Injection-Date: Sat, 13 May 2023 05:59:15 -0000 (UTC)
Injection-Info: gallifrey.nk.ca; posting-host="doctor.nl2k.ab.ca:204.209.81.1"; logging-data="88065"; mail-complaints-to="usenet@gallifrey.nk.ca"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: doctor@doctor.nl2k.ab.ca (The Doctor)
Lines: 50