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 5F699A0A03; Sun, 17 Jan 2021 19:10:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8BCB9140D54; Sun, 17 Jan 2021 19:10:45 +0100 (CET) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mails.dpdk.org (Postfix) with ESMTP id 0CFCB140D4D for ; Sun, 17 Jan 2021 19:10:43 +0100 (CET) Received: by mail-pg1-f169.google.com with SMTP id n10so9491159pgl.10 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=uI7Dx2oMIonH48IjQDD3AxaRtXk6aYVnt/yFhDQLtYyZyDfWuAoXEFGwJPTZXP6XKa SEvulrTG0F2VdIZfnOkxjUm3amf3o/TvZrKIBHoc2+dgtgtWPSDB+4Z8SOspxr9D2/sN L0k/oVMSA59lHSsExRjAuSmhsJwtRBL+UCbyF8OHQzPpImRrPBWkIGK4J3C8gosxhKDa Ft1jgAHs72L/EFOXl2deOlusahxxqY7qANnPT3i2wDR8gS+DsGHunyhOOQwqiWiPWWXq qfbd21f9cFSHk65IJ6ZKrh7OvdjRgUQ02LL+bo16Fm32R+rt1SmaIFSjh+3jUmGAdkvw 5r8A== X-Gm-Message-State: AOAM533SJpkMMjSRPlfsp9Gp/76wdYl/iju5q5p6Aq6cbSSJElvuLjNl A+H3fZnBHRJ1pCOfJcUdcq3Qew== 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-dev] [PATCH v2] eal/windows: explicitly cast void * to type * 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 Sender: "dev" 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.