From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 66065428C0; Mon, 3 Apr 2023 18:30:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F26A440A7E; Mon, 3 Apr 2023 18:30:27 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5ED79400D6 for ; Mon, 3 Apr 2023 18:30:26 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 79815210CB25; Mon, 3 Apr 2023 09:30:25 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 79815210CB25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1680539425; bh=e6k1RfG8I23KcpiSaURmSocO7PdWX8ufjbXY2KLcvjo=; h=From:To:Cc:Subject:Date:From; b=WAp+gnZNYen1J3ZNlnNmZ8mJlKa2lHKu1m9qpBi9kWmch6S5lJDjKMN85A0ITFZum JUBg/Zjco760DENYyXnYVxD2+gG2ovKsdJUkVxrboJ1mDMHVIZfOIUdrBJCD+2bSo+ goiDphOqd87uF1jD1BUERKistOBjSHJKBmm26njU= From: Tyler Retzlaff To: dev@dpdk.org Cc: ciara.power@intel.com, bruce.richardson@intel.com, david.marchand@redhat.com, thomas@monjalon.net, Tyler Retzlaff Subject: [PATCH 0/2] improve code portability Date: Mon, 3 Apr 2023 09:30:22 -0700 Message-Id: <1680539424-20255-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Improve portability of telemetry code to allow it to be compiled by msvc unconditionally. Remove use of VLA and instead dynamically allocate. MSVC will never implement VLAs due to misuse / security concerns. Remove use of ranged based initializer (a gcc extension) instead just explicitly initialize individual array elements. Tyler Retzlaff (2): telemetry: use malloc instead of variable length array telemetry: use portable syntax to initialize array lib/telemetry/telemetry_data.c | 20 ++++++++++++++------ lib/telemetry/telemetry_json.h | 32 +++++++++++++++++++++++--------- 2 files changed, 37 insertions(+), 15 deletions(-) -- 1.8.3.1