From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id ED7081F953 for ; Fri, 29 Oct 2021 21:37:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231173AbhJ2Vjt (ORCPT ); Fri, 29 Oct 2021 17:39:49 -0400 Received: from cloud.peff.net ([104.130.231.41]:49858 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230139AbhJ2Vjq (ORCPT ); Fri, 29 Oct 2021 17:39:46 -0400 Received: (qmail 23924 invoked by uid 109); 29 Oct 2021 21:37:17 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Fri, 29 Oct 2021 21:37:17 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 23287 invoked by uid 111); 29 Oct 2021 21:37:18 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Fri, 29 Oct 2021 17:37:18 -0400 Authentication-Results: peff.net; auth=none Date: Fri, 29 Oct 2021 17:37:16 -0400 From: Jeff King To: Carlo Marcelo Arenas =?utf-8?B?QmVsw7Nu?= Cc: git@vger.kernel.org, avarab@gmail.com, "Randall S . Becker" Subject: Re: [PATCH] wrapper: remove xunsetenv() Message-ID: References: <013a01d7cd092d91cb088b5610nexbridge.com> <20211029212705.31721-1-carenas@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211029212705.31721-1-carenas@gmail.com> Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, Oct 29, 2021 at 02:27:05PM -0700, Carlo Marcelo Arenas Belón wrote: > Platforms that are using the git compatibility layer for unsetenv > use void as a return value for unsetenv(), so any function that checks > for a return value will fail to build. Good catch. > Remove the unused wrapper function. I don't mind removing this if nobody is using it, but doesn't your first paragraph argue that our definition of gitunsetenv() is just wrong? I.e., it should return an int, even if it is always "0"? Or is it a portability question? I.e., are there platforms where unsetenv() also returns void, in which case we must make sure nobody ever looks at its return value (and xunsetenv() is therefore a wrong direction)? -Peff