From nobody Sat Nov 30 16:51:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y0wzm4p1qz5fJ9f; Sat, 30 Nov 2024 16:51:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzm3HCSz4nTX; Sat, 30 Nov 2024 16:51:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NjlRx9pdxZ3cYi90G9RBgTvfIjhGz1tlpWy7WP8bXNE=; b=lQBqYCb3oMN4XJmh1W9UWAV74U8+UdEoOk7D4+a4kghoFm5GWf0Ae61Gsr8lcMMSgyalQP N1+Lp+9OIsHuBShIDnXEzZ3ycNM/m3ebQlZoHpmgmWAeqiU/4pNZXKKxgIUwePf/bjMgKP RT0ZPZUIDKWYO6yKnzEFNOcLbYsmDBeAt39ECkL9l/UfbrjGNh2aR2TKBJ96Dj883B4cO0 OJyJyOSIF0V+2pZ8HUkc3OPwGa2xYlvQfWGXoGGOz6ejYU8a9Yew6vXn2XwxeiHXEe3/py 7BPA45ovEUC5s/zE9odc6+h0j9yXuV3tiGjWs4AniqJj5++/gMDTph/gHU4ifw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NjlRx9pdxZ3cYi90G9RBgTvfIjhGz1tlpWy7WP8bXNE=; b=XIa+EXjK6elkYTzSTJQrslBPyoaCIlm26d3q/bJ2tbEREnZw1wNDa2TOED/upZMs74wOhp 2sxekI5slMK8VUBjx0pZyDFzkejRPAPF5lnM3PGgsr0QYQk14Invk90dTCs28eNuZAVqV4 4ygeL4gLWitLUI8VB5B0rhlVThWVq4EStfbcqjP8FDrVVe67babqjGBVaot+m4KhePcAT6 K2xBOAzCgsHTecH+P+gE8jQc6WwDHYSXYWvtInlmxjF35trgso4vQMjoEk9JRXR808gvZ0 CuUxYNl9B/FWJbqCkfSO94asqlvkTfH2bqhyByV6Ik/hyGFBwC1hr8MDIvc+Bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985476; a=rsa-sha256; cv=none; b=xQP7IvjfrB/opLb+O/ih9ikaxYsW2T0TzcZv0XgcSaj+ZNMy0YR5PapoYnVUheZAsgM4/U kHgSNpjwl6HvTrgVETHsobw2JjuG/V23fLvsO0uapfkvztv9KiM6XpG4wjnGbkyL90x0UD 2+kbszK7U24PUi6U20GSdocsh39lE4piIkfT6zXTVRLjHvGuWy9QEglrr+fRrAMm/g/0nI nHppDIIZ+IWr6IdiAzWSAtm9cke3Los8YKqJoHdATVQ8jyuofc7s/ESKB61b59GPrjwYNI Jbgib9tXjpV+hLX9jpcOApNbY+0sO0He0NyCA+VthMnkkMcsO4LuVi+6uhOwcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzm2v2mzFxf; Sat, 30 Nov 2024 16:51:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpGkl043731; Sat, 30 Nov 2024 16:51:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpGHv043728; Sat, 30 Nov 2024 16:51:16 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:16 GMT Message-Id: <202411301651.4AUGpGHv043728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 360c47b956d8 - stable/14 - elftoolchain: Consistently use item count as the first argument to calloc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 360c47b956d8129305a69a2f8ff949bb39189af5 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=360c47b956d8129305a69a2f8ff949bb39189af5 commit 360c47b956d8129305a69a2f8ff949bb39189af5 Author: John Baldwin AuthorDate: 2024-07-19 17:02:45 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +0000 elftoolchain: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46007 (cherry picked from commit b73445a32f8a3648372c0042ef633fe61b38d135) --- contrib/elftoolchain/libdwarf/libdwarf_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/elftoolchain/libdwarf/libdwarf_init.c b/contrib/elftoolchain/libdwarf/libdwarf_init.c index b85c87c59af0..95ed6147ba89 100644 --- a/contrib/elftoolchain/libdwarf/libdwarf_init.c +++ b/contrib/elftoolchain/libdwarf/libdwarf_init.c @@ -302,7 +302,7 @@ _dwarf_alloc(Dwarf_Debug *ret_dbg, int mode, Dwarf_Error *error) { Dwarf_Debug dbg; - if ((dbg = calloc(sizeof(struct _Dwarf_Debug), 1)) == NULL) { + if ((dbg = calloc(1, sizeof(struct _Dwarf_Debug))) == NULL) { DWARF_SET_ERROR(dbg, error, DW_DLE_MEMORY); return (DW_DLE_MEMORY); }