From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from alyss.skarnet.org (alyss.skarnet.org [95.142.172.232]) by inbox.vuxu.org (Postfix) with SMTP id D2C832E858 for ; Wed, 4 Sep 2024 13:56:44 +0200 (CEST) Received: (qmail 2811 invoked by uid 89); 4 Sep 2024 11:57:10 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 2804 invoked from network); 4 Sep 2024 11:57:10 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725451002; x=1726055802; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=R2p3HOQl5tNy2y4NgzbZTBxOAzMaCN/GJTGuX7LLVq0=; b=nXlXF7uGMh8NuwKnjpmQ4ZEVlctHAwdpZH3968D3XZdR/7gOVINKOeMzZVMAIAhm4j kRFbaiJeThgAd7N/pBRNe3gbE7xqgHVx4NoukX1XAvySyO1o//fspFn+5kanbIX/LeWo uJe2tlP8neN0o7mKhlBdNL4wvLWMm+kxAZ7X2Yww6yeIJwVjMIw4/XGnrfyblDEVP9rs P9KYIW/8z0zE+DJuGng8Vz9QFSUXxxWF6PhvblzTDSqwusv72nd3UxqO7ROaaJmqsW5A ClljnISSsr0viGoACA23fFlHY4l7qdO3hextUt+6o2Ky5bMtlM/h/HL/mSDmIDDB1Pzz 2dCw== X-Gm-Message-State: AOJu0YyLOSg6K9e11kKPK0YsbUTUj8pZH3W2zsBZN1cpj4UkMdWHBcbP Am6uP73HPq7ryrZXBBPtPAK3fhI/+c58GdThN3BYP+Mma7wZxrLEePvjHmjS X-Google-Smtp-Source: AGHT+IEPoqEsZfgg6sGdrwpRBf5uEQwv568UZsBE6JV0SUXZneWOR+8lVqmx5CGqnWv8ECe5ywlxJw== X-Received: by 2002:a05:6000:c8e:b0:367:9903:a91 with SMTP id ffacd0b85a97d-3749b526808mr16957903f8f.11.1725451001626; Wed, 04 Sep 2024 04:56:41 -0700 (PDT) From: Leah Neukirchen To: Zhixu Liu Cc: supervision@list.skarnet.org Subject: Re: runit: tryshsgr.c: why not test whether gid_t is short by using "sizeof(short) == sizeof(gid_t)" In-Reply-To: (Zhixu Liu's message of "Wed, 4 Sep 2024 19:35:23 +0800") References: Date: Wed, 04 Sep 2024 13:56:39 +0200 Message-ID: <87ttev7hu0.fsf@vuxu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Zhixu Liu writes: > Hi, > > I'm trying to keep runit remaining available in gentoo's official portage tree, > see https://bugs.gentoo.org/938282 . I setup a github repo at > https://github.com/clan/runit/ for this purpose, following is what I'm doing > now: > 1. fix all the compilation error(s) > 2. eliminate the compilation warning(s) as much as possible > > Now I 'm in stage 2, when fixing the warning of > -Wincompatible-pointer-types, see > https://github.com/clan/runit/blob/master/admin/runit-2.1.2/src/tryshsgr.c > > As G. Pape has commented at > https://github.com/clan/runit/commit/5a7b8099ae638ce72abae2c4d8cac7ce33477522 > >> "tryshsgr" is specifically there to check whether the size of gid_t is short, >> it doesn't matter if it fails at compile time or run time. But with this >> change, it always succeeds, and so always size short is >> assumed, even though most systems should have unsigned int I guess. As of runit.git 84457fd2 (2005-08-23), prot_gid is unused and all of this is dead code that can be removed. setgroups is used directly with proper gid_t types. -- Leah Neukirchen https://leahneukirchen.org/