From nobody Thu Aug 25 01:26:13 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MClfc3pVnz4ZNFd for ; Thu, 25 Aug 2022 01:26:16 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MClfc2q7Yz40mm for ; Thu, 25 Aug 2022 01:26:16 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f44.google.com with SMTP id h5so21942814wru.7 for ; Wed, 24 Aug 2022 18:26:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc; bh=gHbsVkQ116XiWW/jiZKXnewG+rICciX2CfMMOVajTgw=; b=rZS8Xmj1exSax+OQTXw6mVD6WoRE58pzHtY8Pa7jjfHrlUhdazQY8jVflaTozinnOD 9DfjaJ6WGOLCbJMYjoxmNTqurRGWSLuqTc1bBJv1hF70eF0OhzWf22zXVvN0/URnumll Wy1Iu4oHBHzTmxPgV6OD8him63lTHoe1bCxRXP2J5Ii0niAE7NNhbJZKXaPxVULkbt+e 1+00yFVm7X7cNSrKZ/4qrcCp8Xt++R03TgnfK2mO1/jz8X7nLo3ToTNUd8K/SsYZ83ac fFITx+mOV8emmeCRTJkHhZ1TfcdpWcutKwelmx1hQE18S/XXSNjPMLcKH6DYxgzC7qAx +J0Q== X-Gm-Message-State: ACgBeo2KvRd/dsVyJSwmT5wjn2KmsrtHlUN0a4QSbSNRBZWORdiy2EYM oKKIEKo3NxeZLiAL275E37lPrw== X-Google-Smtp-Source: AA6agR76rOAkpm4KebPQ7kjI0iidahNVp/cyOJPxXxzpxgnsCZ4cCiRXZ64YpfEtKj3qtrnF4Sb6JA== X-Received: by 2002:a5d:6d0c:0:b0:225:4ff9:7e67 with SMTP id e12-20020a5d6d0c000000b002254ff97e67mr812518wrq.534.1661390774358; Wed, 24 Aug 2022 18:26:14 -0700 (PDT) Received: from smtpclient.apple (global-5-141.n-2.net.cam.ac.uk. [131.111.5.141]) by smtp.gmail.com with ESMTPSA id c8-20020a05600c0a4800b003a5ca627333sm4018805wmq.8.2022.08.24.18.26.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Aug 2022 18:26:13 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: git: 05c9a0158f68 - main - libc: Add strverscmp(3) and versionsort(3) From: Jessica Clarke In-Reply-To: Date: Thu, 25 Aug 2022 02:26:13 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <48508922-8A39-424C-9CD6-1DE56EF0AA13@freebsd.org> References: <202208250029.27P0TRwK091769@gitrepo.freebsd.org> To: Konstantin Belousov X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Rspamd-Queue-Id: 4MClfc2q7Yz40mm X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On 25 Aug 2022, at 02:22, Konstantin Belousov = wrote: >=20 > On Thu, Aug 25, 2022 at 02:07:12AM +0100, Jessica Clarke wrote: >> On 25 Aug 2022, at 01:29, Konstantin Belousov = wrote: >>> + const unsigned char *u1 =3D __DECONST(const unsigned char *, = s1); >>> + const unsigned char *u2 =3D __DECONST(const unsigned char *, = s2); >>=20 >> Why is __DECONST needed? Casting from const char * to const unsigned >> char * should never warn, surely? >=20 > I requested the use of __DECONST there. Nobody knows what would be = next > trend in the C language breaking among compiler writers. We guarantee > that __DECONST() is adopted to whatever warnings are added. This is not good justification to do so. Sprinkling unnecessary __DECONST throughout the code base makes it harder to figure out = what=E2=80=99s actually going on as you have to figure out if the __DECONST is actually doing something interesting or there out of paranoia. Jess