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 58E20A0A03; Sun, 17 Jan 2021 20:51:20 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D2D39140D22; Sun, 17 Jan 2021 20:51:19 +0100 (CET) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by mails.dpdk.org (Postfix) with ESMTP id A63E9140CFB; Sun, 17 Jan 2021 20:51:18 +0100 (CET) Received: by mail-lf1-f46.google.com with SMTP id b26so20993298lff.9; Sun, 17 Jan 2021 11:51:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xlyvJadeK+g5pT9Wl+z6KTspZVrBYmwPap8Ue6iBCdE=; b=S51MF47mweUtp8Bbr8UN+4pd2E/YnIW9BOiPuR98XJBCRI6I2Lw3sbZTrC9T/K5c3B MROVGIagRPSEOUfgPakChf7wvA5mE/t9upmiPirnFaLmlkc+04lCWfeld+qsQfNV4B/g 5AYNrlzrqUBCatacW8XM17M9Sxw5AuMnmxSgBdZsb6RdY4oJNMN2M1qvJS/8iY30cPok WF7eb4XnG27vvtW+fQ/uy1mBskFn+QwTiC2sb8pDJIiSqBRlsS6c9omZhhk8YXdPCH1H cn0BcqTJQ/0Qkhk0+tmzLaqSwoIfgLE3VhilqAg90x8nSvi5bSdJ2qScmFiuaPWkLjl4 T3nw== 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=xlyvJadeK+g5pT9Wl+z6KTspZVrBYmwPap8Ue6iBCdE=; b=VxQfQnm2G303Z4qD1f5ddu5xvdotI7k3yRE2gyUedJsHGd7QJw89RawCvxErX574Q6 1ZQvf7nlWsDwrYHwzccMQGaN+40UCkt9BZmbjybqiUA+jskA6Sm+T0HYVO3xmb/cBdHM Tdwh7ZF7gsT/BxZCgN2A/mlMeSI1Q0P3ig/rPE4NGQ9uRagYDFCqm5Ta1F+L4Tm+aXq6 vkIcf46Zr+a6nIjVCHonEv6bjPnkiGvBYrLdfuA07dPD25hMEumsBunDQABzimaoWbjS UCUbTnWU60eLMbEDn7/ZIPC8uV1yM2Nrki14OzhqFCvmY/xrv/gt6k5LD5TwiNiJmz1K /SdA== X-Gm-Message-State: AOAM533T3iyCrR2IxeRgMxECjV/mkBOj8qWZraMc0x+1lyW1gvViqZ3L e2QHWjOYf7LYfFV0EQCnp9vKpY5LW0yjLQ== X-Google-Smtp-Source: ABdhPJyuaVOQFoyiao50Yp5QL8CCCs7B31JmV5ZGo9fplkHmzh9kXfG/sNlThCrmuiv6/0u6k86tag== X-Received: by 2002:a19:8210:: with SMTP id e16mr9067571lfd.69.1610913078154; Sun, 17 Jan 2021 11:51:18 -0800 (PST) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id v10sm1483819lji.130.2021.01.17.11.51.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jan 2021 11:51:17 -0800 (PST) Date: Sun, 17 Jan 2021 22:51:16 +0300 From: Dmitry Kozlyuk To: Stephen Hemminger Cc: Tyler Retzlaff , dev@dpdk.org, stable@dpdk.org Message-ID: <20210117225116.58c58e44@sovereign> In-Reply-To: <20210117101039.1dcf7201@hermes.local> References: <1610414325-9104-1-git-send-email-roretzla@linux.microsoft.com> <1610739501-21508-1-git-send-email-roretzla@linux.microsoft.com> <20210117101039.1dcf7201@hermes.local> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) 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 Sun, 17 Jan 2021 10:10:39 -0800, Stephen Hemminger wrote: > > - *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 {"? Code inside extern "C" is not compiled as C; directive only affects linkage. > Bigger question is why is this code inlined? It is not critical path > and should be a function. Absolutely. There's more: windows/rte_os.h should not expose POSIX symbols at all, I'm working on a patchset to clean it up and un-inline this code.