From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 04C9A3858D1E for ; Mon, 9 Jan 2023 17:09:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 04C9A3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673284194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AsMFp2Ta8DTc6SpnKdFeESWDSJuibdqaCVzCn3tjCTY=; b=eLzLhHZSm9oI2tSOm08qNyzkxUQ2sxJlLvv/tPDDVhmix+BaHr5fg+/kAGdOHTh1TsfYJC 4E+2me/tIvhFUekskHp0GsRVtpa2ZgdkvQeLXzlO+cSBOvs088RsD94bhQ1exRp/In86MQ b7wR78KLX+/qIxV/ouJBoL3YaF9fD7g= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-189-jbPAHwWeOOO6347wBUsBQg-1; Mon, 09 Jan 2023 12:09:45 -0500 X-MC-Unique: jbPAHwWeOOO6347wBUsBQg-1 Received: by mail-qv1-f69.google.com with SMTP id i7-20020a056214020700b004ffce246a2bso5464681qvt.3 for ; Mon, 09 Jan 2023 09:09:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AsMFp2Ta8DTc6SpnKdFeESWDSJuibdqaCVzCn3tjCTY=; b=i0OjdoTpHzVa1IKduH40AniDvr5e7BE+GugSm80Rs/xKF68w+Qhw0rLwmBCUB7C4MB 5Ds0jGLYLd9Y4En8WaxoLSWz+mdGRxpxNKWXt8hBvuJQRKlfanMWaFqmhojtYpfqXUjv dwaFgNwCplOjQaYXLvdczelU8j+TFKOFMTo6gAVHeSsvhUuVf2YPChONBpacQkWyQo5c vF2lJc7/8SeEYqg1kVg51vMx5i9de4VrBEPdcmC24fqVVVKHQZhnfwwW5dTxXqsqvV/b KUmNdHEDblw4MchJRqbovglo4ueVSmlHjk2aPEDLKOgDGAEmHZHptQXkphsesgf2hu3d 0aKQ== X-Gm-Message-State: AFqh2koGTBQy1zmA/SSLXOJYCpkymmDbhHWZoQtlLnEAnUvsyNuM0ef3 SQCiIHHK//x1sqPkh9bbgBU5EXIP/lZjD+YoBD5KD2/PYdklkzY4dTtwuAco2YzdkJ1OXxt4ugS rU6NF0mUWECLb3okjt2EP X-Received: by 2002:ac8:7459:0:b0:3a6:8f7c:5936 with SMTP id h25-20020ac87459000000b003a68f7c5936mr91870809qtr.25.1673284185292; Mon, 09 Jan 2023 09:09:45 -0800 (PST) X-Google-Smtp-Source: AMrXdXsfqpojFdIutkpxsa/fbLISrPyT0iqQdJgsQIMw9/qLoY1eEEss3cWVI2SOQvmEjqMDu6Bc1A== X-Received: by 2002:ac8:7459:0:b0:3a6:8f7c:5936 with SMTP id h25-20020ac87459000000b003a68f7c5936mr91870793qtr.25.1673284185065; Mon, 09 Jan 2023 09:09:45 -0800 (PST) Received: from [192.168.0.241] (192-0-145-146.cpe.teksavvy.com. [192.0.145.146]) by smtp.gmail.com with ESMTPSA id b20-20020ac85414000000b003ac83b7f5d4sm2723968qtq.29.2023.01.09.09.09.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Jan 2023 09:09:44 -0800 (PST) Message-ID: Date: Mon, 9 Jan 2023 12:09:43 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH 2/4] sunrpc: Suppress GCC -O1 warning on user2netname [BZ #19444] To: Adhemerval Zanella , libc-alpha@sourceware.org References: <20221229125802.2715435-1-adhemerval.zanella@linaro.org> <20221229125802.2715435-3-adhemerval.zanella@linaro.org> From: Carlos O'Donell Organization: Red Hat In-Reply-To: <20221229125802.2715435-3-adhemerval.zanella@linaro.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12/29/22 07:58, Adhemerval Zanella via Libc-alpha wrote: > The same issue described by 6128e82ebe973163d2dd614d31753c88c0c4d645 > also happend with -O1. > > Checked on x86_64-linux-gnu. > --- > sunrpc/netname.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) LGTM. Reviewed-by: Carlos O'Donell > > diff --git a/sunrpc/netname.c b/sunrpc/netname.c > index c1d1c43e50..a10591c071 100644 > --- a/sunrpc/netname.c > +++ b/sunrpc/netname.c > @@ -49,10 +49,11 @@ user2netname (char netname[MAXNETNAMELEN + 1], const uid_t uid, > if ((strlen (dfltdom) + OPSYS_LEN + 3 + MAXIPRINT) > (size_t) MAXNETNAMELEN) > return 0; > > - /* GCC with -Os warns that sprint might overflow while handling dfltdom, > - however the above test does check if an overflow would happen. */ > + /* GCC with -Os or -O1 warns that sprint might overflow while handling > + dfltdom, however the above test does check if an overflow would > + happen. */ > DIAG_PUSH_NEEDS_COMMENT; > - DIAG_IGNORE_Os_NEEDS_COMMENT (8, "-Wformat-overflow"); > + DIAG_IGNORE_NEEDS_COMMENT (8, "-Wformat-overflow"); > sprintf (netname, "%s.%d@%s", OPSYS, uid, dfltdom); > DIAG_POP_NEEDS_COMMENT; > i = strlen (netname); -- Cheers, Carlos.