🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.linux.misc
Article #1976

Re: Substantive Comments Please: GCC vs. LLMV

#1976
From: rbowman
Date: Mon, 02 Nov 2026 20:17
17 lines
1614 bytes
On Mon, 2 Nov 2026 14:18:27 -0500, Chris Ahlstrom wrote:

> It found a few issues in a couple of my projects, a few issues
> important.
> There is one that I don't get
> 
>    subprojects/libcfg66/src/util/filefunctions.cpp:1138:33: warning:
>    Memory allocated by 'new[]' should be deallocated by 'delete[]',
>    not 'getline()' [unix.MismatchedDeallocator]
> 
>  1138 |   ssize_t count { getline(&destination, &maxim, input) };
>       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> I guess I need to use malloc() instead.

Did you allocate destination with new? getline will malloc a buffer if you 
pass in NULL. 
Technical Details
Message-ID: <nks9f4F2rmsU5@mid.individual.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <18e37e973e22a7a6$1$3179723$802601b3@news.usenetexpress.com> <11c7kmg$22g7e$1@dont-email.me> <11c80ic$26et9$4@dont-email.me> <11cafc8$31pdt$1@dont-email.me> <11canpv$35aju$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: rbowman <bowman@montana.com>
Newsgroups: comp.os.linux.misc
Subject: Re: Substantive Comments Please: GCC vs. LLMV
Date: 2 Nov 2026 20:17:40 GMT
Lines: 17
Message-ID: <nks9f4F2rmsU5@mid.individual.net>
References: <18e37e973e22a7a6$1$3179723$802601b3@news.usenetexpress.com>
	<11c7kmg$22g7e$1@dont-email.me> <11c80ic$26et9$4@dont-email.me>
	<11cafc8$31pdt$1@dont-email.me> <11canpv$35aju$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net Uqln312L4y5jVdalht+5aQQxrYdcnipMUaW7aJxFkLAEuO5lR/
Cancel-Lock: sha1:w/8e1sO84oleG5UX7wlm7j58b1M= sha256:RxsxQxSZxztKa23CXKpi5+UjALgPaWl03OR21VavoJM=
User-Agent: Pan/0.165 (Kostiantynivka)