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 9E7F9A0A03 for ; Sun, 17 Jan 2021 19:10:45 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CB92140D34; Sun, 17 Jan 2021 19:10:45 +0100 (CET) Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by mails.dpdk.org (Postfix) with ESMTP id 0B982140D34 for ; Sun, 17 Jan 2021 19:10:43 +0100 (CET) Received: by mail-pg1-f171.google.com with SMTP id c132so9527175pga.3 for ; Sun, 17 Jan 2021 10:10:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3CJxojUyL02uJQ19Q6v/dWswYtIKdAI0oQIK7uhg+rI=; b=lNRTyN9RHgF2hsZBu6nWXkzZaGOHNlu7KHCa7W+Lpx/cKaDNSlyWiiOc9sZEDGcYaH ZpWnmoScmL1q6jCP+oapHkyQ+7OdVBVDebdZRdoIE6MyUQt7Nj2wYbORzARGDdJuu1vf 7iyt6paFd2sAkdbNNjOzIgJM1Rf3D46K8TrWXtNVwTQjk65/9AsGzmJ+HsI6tqDdxPNG 1Lajp9PNGTd7lyt3ydPjP5v6WrKQiSxsH4pM22INODCdPkVHtGRGQ6ZjKDLbClJaxOcX 2hjchb37pf0fCkcw14yyRUPZ0eVUvL8HtigQoiMyP/kSQh/zAoF4AVoR7uk2fCJa0Atm u2MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3CJxojUyL02uJQ19Q6v/dWswYtIKdAI0oQIK7uhg+rI=; b=oP3emBDQDsj7oylxgsHJfAI5QWtlr2tS1v/sNeyZSP8ZHf3dj/izAInDXzEb+t/hgu OIjAETdt5uKRcqJ1ZOGIL+mrt7VFtstJrydtcGNIsZnILRkdjGkHBTvoDqORvw3jJ2+q wcIzvBEDo2Kr2pjDJPOBoy98pCXEfjmqmAQ4qsyB4+U15YA6iJDSFxlFIoNZn6ZJU8p7 26b8x6kWTAWd6fUCZa18XJ+ebQdTL/w24Yq0gy3TCcq8gCnip22GnSowC237UncmT9tB hPeQhzSbEBByiuItHJG6P665LcgW8cYy1Db3cC+dWTTxKu/Wviv/71rLeZQLz46NeQBe K+rA== X-Gm-Message-State: AOAM532tdjRs6pfLwYFgaKitmbnifrpSba+JFiXl2i2xHEmniXGnCPmx PWIRM3i6ovPut9IyTCgrsJ8D7A== X-Google-Smtp-Source: ABdhPJzW+/QPN0almc0tBhCHrB+KG9Z4BYMfLVI1+oSkyuJYDIdCFF902N/ABPXTseUkS3Ra5geqbg== X-Received: by 2002:a63:1315:: with SMTP id i21mr22571390pgl.370.1610907043098; Sun, 17 Jan 2021 10:10:43 -0800 (PST) Received: from hermes.local (76-14-222-244.or.wavecable.com. [76.14.222.244]) by smtp.gmail.com with ESMTPSA id d2sm13723489pjd.29.2021.01.17.10.10.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jan 2021 10:10:42 -0800 (PST) Date: Sun, 17 Jan 2021 10:10:39 -0800 From: Stephen Hemminger To: Tyler Retzlaff Cc: dev@dpdk.org, stable@dpdk.org, dmitry.kozliuk@gmail.com Message-ID: <20210117101039.1dcf7201@hermes.local> In-Reply-To: <1610739501-21508-1-git-send-email-roretzla@linux.microsoft.com> References: <1610414325-9104-1-git-send-email-roretzla@linux.microsoft.com> <1610739501-21508-1-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] eal/windows: explicitly cast void * to type * X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Fri, 15 Jan 2021 11:38:21 -0800 Tyler Retzlaff wrote: > Explicitly cast void * to type * so that eal headers may be compiled > as C or C++. > > Fixes: e8428a9d89f1 ("eal/windows: add some basic functions and macros") > Cc: stable@dpdk.org > > Signed-off-by: Tyler Retzlaff > --- > lib/librte_eal/windows/include/rte_os.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h > index ea3fe60e5..7ef38ff06 100644 > --- a/lib/librte_eal/windows/include/rte_os.h > +++ b/lib/librte_eal/windows/include/rte_os.h > @@ -86,7 +86,7 @@ asprintf(char **buffer, const char *format, ...) > return -1; > size++; > > - *buffer = malloc(size); > + *buffer = (char *)malloc(size); > if (*buffer == NULL) > return -1; > Why is the compiler enforcing C++ rules on code that is inside "extern C {"? Bigger question is why is this code inlined? It is not critical path and should be a function.