From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BC119385701C; Mon, 6 Nov 2023 10:44:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC119385701C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699267471; bh=EtZ0WgeE/ns9TuNGzqOBVzqK2kHiOxIru9Fj4DBDPTc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qOOZoD3E8TTCBcJd2ppRYaBmfN4YM8UFNZdnfs+NvyxiQ2U69oedYzP9etqZirZom xBEDOPBhqAI3xTgx/V2RLWjI+KHeTGp82b/n/6so4xSj+nuhwIOiBwP4PhfJdsGG3h RCVtHtQdfp2A/Ik82q3HsgesBHnKkVkjVNl2IZ2Q= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/112364] calloc used incorrectly Date: Mon, 06 Nov 2023 10:44:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: build, diagnostic, easyhack, internal-improvement X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112364 --- Comment #12 from CVS Commits --- The master branch has been updated by Tobias Burnus : https://gcc.gnu.org/g:17df6ddcf11aef6d200305d35641a7deb2f430e1 commit r14-5148-g17df6ddcf11aef6d200305d35641a7deb2f430e1 Author: Tobias Burnus Date: Mon Nov 6 11:34:31 2023 +0100 libgfortran: Fix calloc call by swapping arg order [PR112364] The prototype of calloc is void *calloc(size_t nmemb, size_t size); denoting "an array of nmemb objects, each of whose size is size." (C23) In order to follow the meaning of the argument names and to silence a -Walloc-size warning, this commit swaps the order of the two args to read now: calloc (1, sizeof (transfer_queue)); libgfortran/ChangeLog: PR libfortran/112364 * io/async.c (enqueue_transfer, enqueue_done_id, enqueue_done, enqueue_close): Swap 1st and 2nd arg in calloc call.=