Message ID | 20240724221824.585054-5-dmalcolm@redhat.com |
---|---|
State | New |
Headers | show
Return-Path: <gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DKT/X6Zu; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WTpPS6NHFz1yY9 for <incoming@patchwork.ozlabs.org>; Thu, 25 Jul 2024 08:20:44 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1EC08385E45B for <incoming@patchwork.ozlabs.org>; Wed, 24 Jul 2024 22:20:43 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id DC808385C6CF for <gcc-patches@gcc.gnu.org>; Wed, 24 Jul 2024 22:18:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DC808385C6CF Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DC808385C6CF Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721859527; cv=none; b=okMEB6m8iVZwJQ/ySOVC6iImiVIoztaLDA+VT1cgKNbNIDhMtd0tJVQcEbC0/G+DPuSHPSo4NJ9m54bs1h9x+4TF7QTOe04jcSDkGHPS5ANWtxKg+qWaXWXSD7UwnmRDq7risrhxmfEy5G+PYJux/H/3d0uKdW/VTYjwmnRTFOk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721859527; c=relaxed/simple; bh=HBHHrDARg8n9BdB3xNJ0s+ZGbU1Ef2B8NLouKJuR8gM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=q8CVrwbbFGJp3TYPlgK1ErHJw7s9DVEpViCI06QZN6aKWzwTWdb+wYB+jPFqxEXhXv1qyZaCx+XrIu2tNNCKRrQowc/PQ0FvPYwO0TBgl86hIgRDFOeq2VY+d8TThR4AkgZXSuDFqLKxpcUhDkOs1X/Ri17B4DKuUBkjBupqoDc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721859524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TPchOibo337dQlHaAVW5+YnTRAlLavl1aNmD4qJp9A0=; b=DKT/X6Zu7HsrnsgGSZc3JtzlLbDRKqDP2efINgmQ26+Z4CCsMMch8+jH+GHaw+crqTIEaZ iuLG3j0FOmrl4ptQNyIk+jcZ8XYWKsfgspx8b8cPSU9N4aYoQosAvS7s4BUv5Ew55DbTfR foc5eFCdtbLagcWfpBKXU/p80djf7XE= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-618-X_WIatl-NqKPURl2pycHSw-1; Wed, 24 Jul 2024 18:18:43 -0400 X-MC-Unique: X_WIatl-NqKPURl2pycHSw-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C13611955F56 for <gcc-patches@gcc.gnu.org>; Wed, 24 Jul 2024 22:18:41 +0000 (UTC) Received: from t14s.localdomain.com (unknown [10.22.33.183]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5B27C1955F40; Wed, 24 Jul 2024 22:18:40 +0000 (UTC) From: David Malcolm <dmalcolm@redhat.com> To: gcc-patches@gcc.gnu.org Cc: David Malcolm <dmalcolm@redhat.com> Subject: [PATCH 04/16] gcov: reduce use of naked "new" for json output Date: Wed, 24 Jul 2024 18:18:12 -0400 Message-Id: <20240724221824.585054-5-dmalcolm@redhat.com> In-Reply-To: <20240724221824.585054-1-dmalcolm@redhat.com> References: <20240724221824.585054-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org |
Series |
Revamp of JSON/SARIF output
|
expand
|
diff --git a/gcc/gcov.cc b/gcc/gcov.cc index e76a314041cd..85fdac4368e8 100644 --- a/gcc/gcov.cc +++ b/gcc/gcov.cc @@ -1285,8 +1285,8 @@ output_intermediate_json_line (json::array *object, const int covered = info.popcount (); json::object *cond = new json::object (); - cond->set ("count", new json::integer_number (count)); - cond->set ("covered", new json::integer_number (covered)); + cond->set_integer ("count", count); + cond->set_integer ("covered", covered); json::array *mtrue = new json::array (); json::array *mfalse = new json::array ();
No functional change intended. gcc/ChangeLog: * gcov.cc (output_intermediate_json_line): Use json::object::set_integer to avoid naked "new". Signed-off-by: David Malcolm <dmalcolm@redhat.com> --- gcc/gcov.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)