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.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 5BF5C2D2FE for ; Wed, 4 Sep 2024 16:04:36 +0200 (CEST) Received: (qmail 9301 invoked by uid 89); 4 Sep 2024 14:05:02 -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 9294 invoked from network); 4 Sep 2024 14:05:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725458674; x=1726063474; darn=list.skarnet.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=dvUYdgm7iaKHkwv+h1VZZ8WaMggOn8sLKV3nNGIYRTc=; b=mqdZzZJ0cyJAp5CWJ6RUQqxj8lZu3kFaxJWndX245HJAvj70WTVGkRcc8AJjJj0LV5 45n2LXPbo1PeTwx94l+83813qW3/JjjHtxMRgzaMHUeWcbskj5gu0EaWQH67JDSGXmvL TdDI+5dG7VClHS7zk0LMsN/EZoESE1CpoROkUVCFYwo6nbnKExk2Mjri0q1TScDQszrV 2wOzlC2EvL1tcV+g/BZh1tafqpUSvnj1tsrOKTsRZ6w78ZFDPoO8Je1T2C/jVuYSFdwI QQpAVMuZW2+d7keVq7LopzmkU2jYh4/NQ/QGSasPlaNX0zSMhSLYqK/S2EZoDITgFHoy bySQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725458674; x=1726063474; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dvUYdgm7iaKHkwv+h1VZZ8WaMggOn8sLKV3nNGIYRTc=; b=gT0p0qazrvzt6+2SXiD62RVDqkgnsmTjI1fZkth7DaeMVp6jfWSdqRywmh2BSvzosn VeBI3Z5usKa6MoNcvZH5TEUEimqgJ91lLOK4BAvEhdjjvasdWRHag8quTIXZ9u22aHT9 nBW8vZ79WfYaMoYSk2xovqdkksl3ve1De0HRauBghzVH8KEfCPQJdtqZHgOOSz816XMR dSwqr9USD/JxaowrUxjNWvhXyVjvOlvidOZYFdHfa6WOdEvHblWkxkHg5FNbXjzojQgh ySirOzbe2ehcaaHhfqlxvkMHHVL4FTXDDvwGl2+gXyJ5U4qwTred3tyb+3jQnbPIl+bI i6VA== X-Gm-Message-State: AOJu0Yz4DwjHmh1Ng3D3WnXMb6LlgHNahyapZPSFb2tBYW7gqWyhuZpi fq49l4fxJnEh3Q3R0cXxk4Rt8ubuKRbfZMYIDSPidb3M+hr04XKCg9844Eo7dkAqBNM1VfwGIpj SuwKf1R12E9+usEZaZTX/2hG9Cjg= X-Google-Smtp-Source: AGHT+IHeW8zS0Uqo/8Lrl2QnlfzxjKemupDCWwTvOV/LPdm+t8xnO7PAoCl3SU92GR443Rd+7Rvx0CBKQufrxpz+XMI= X-Received: by 2002:a17:906:f593:b0:a80:f67f:771b with SMTP id a640c23a62f3a-a8a42f8af40mr243386666b.2.1725458673755; Wed, 04 Sep 2024 07:04:33 -0700 (PDT) MIME-Version: 1.0 References: <87ttev7hu0.fsf@vuxu.org> In-Reply-To: <87ttev7hu0.fsf@vuxu.org> From: Zhixu Liu Date: Wed, 4 Sep 2024 22:03:57 +0800 Message-ID: Subject: Re: runit: tryshsgr.c: why not test whether gid_t is short by using "sizeof(short) == sizeof(gid_t)" To: Leah Neukirchen Cc: supervision@list.skarnet.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Get and confirm it, thanks for the reply. On Wed, Sep 4, 2024 at 7:56=E2=80=AFPM Leah Neukirchen wrot= e: > > Zhixu Liu writes: > > > Hi, > > > > I'm trying to keep runit remaining available in gentoo's official porta= ge 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/tryshsg= r.c > > > > As G. Pape has commented at > > https://github.com/clan/runit/commit/5a7b8099ae638ce72abae2c4d8cac7ce33= 477522 > > > >> "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 th= is > >> 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/ --=20 Z. Liu