From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 61F80A054A for ; Wed, 15 Jun 2022 10:41:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 58BF04282A; Wed, 15 Jun 2022 10:41:41 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id EA8A940220 for ; Wed, 15 Jun 2022 10:41:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655282499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KVZOhoWyA25JldC32RkX3bvboygJ/L2VfTreVaouUQI=; b=c4Jx1uRTkhUy3gQ/wR5y8aqdEQ3gM55xFR34MLdnMaiOalbqnncMOVYIvsAFYJfOebB+Vb Dl9Xwr0GQISiu3xn2ZFLn//PHLjsngcuMVfmK2hnfg1Jop5YElKRk1JHGRfPU05A+YpJca 7jRElt0k2AFRJ8DcXYHgXaDCMZadSxc= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-210-kVpftG6AMISqutiRReUNuw-1; Wed, 15 Jun 2022 04:41:35 -0400 X-MC-Unique: kVpftG6AMISqutiRReUNuw-1 Received: by mail-lf1-f72.google.com with SMTP id u5-20020a056512128500b00479784f526cso5717258lfs.13 for ; Wed, 15 Jun 2022 01:41:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KVZOhoWyA25JldC32RkX3bvboygJ/L2VfTreVaouUQI=; b=B9dn9M8z/RohiYCL0M5uTCD5VECZGTG2RjPPVIBnqO1XKmzBn5CTfuv7CQNttwWoEK dceD141isfLB3YiLNYImkb+IMfGuXE9tFNerMNPfbbWNr6XFpS2Q1xvJporFpJ+Ztw5o FakNUECTChVeHmXVCs3Spv9VHgbfqhgAftgtenZ7B4VjT2dR4/HFwe2CyM11U2QGV+8G ANWF2ZmIeQNynp43WxBqKaBjK5jkobYYKHnED+h/OHQkWGzybaauj0824nmDWrtwNZOp tcS1i3dLYZUpPaZrluKYV/LuYXVHQOKEesCWbcBQNxXZuDo7b1apEV6rp55M675aE+cE TkaQ== X-Gm-Message-State: AJIora9e7anmyFztBVHKHy7/2jMetqd5yyP1R+dvKXMLIsRz1D+UY4vJ rT6J2f/edOpt75baS3P/0PorR9LSqlxnMjYEWD9uIj/sX6sMOx6tk1DPtFL/oMyau6FYb/CYBX7 Ksyrj2t0mspzRSYlC9rHAjeA= X-Received: by 2002:a2e:3613:0:b0:258:e0cc:d83b with SMTP id d19-20020a2e3613000000b00258e0ccd83bmr4627439lja.297.1655282494418; Wed, 15 Jun 2022 01:41:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v260cKWQStW71lD6Wg2p2jsiJDTjYEERt7nYy40YSkPXJHGsOZHBpcvdbAKwqczY2nuJGyPOAxdFunI0zHuFg= X-Received: by 2002:a2e:3613:0:b0:258:e0cc:d83b with SMTP id d19-20020a2e3613000000b00258e0ccd83bmr4627427lja.297.1655282494222; Wed, 15 Jun 2022 01:41:34 -0700 (PDT) MIME-Version: 1.0 References: <20220511135815.1564053-1-alialnu@nvidia.com> <20220511164109.1574109-1-alialnu@nvidia.com> <6144105.lOV4Wx5bFT@thomas> In-Reply-To: <6144105.lOV4Wx5bFT@thomas> From: David Marchand Date: Wed, 15 Jun 2022 10:41:23 +0200 Message-ID: Subject: Re: [PATCH v2] net/mlx5: fix build with clang 14 To: Thomas Monjalon Cc: Ali Alnubani , dev , michaelba@mellanox.com, dpdk stable , Raslan Darawsheh , Bruce Richardson Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Wed, Jun 15, 2022 at 10:17 AM Thomas Monjalon wrote: > > 11/05/2022 18:41, Ali Alnubani: > > Use fgets instead of fscanf to resolve the following warning > > reported by clang 14.0.0 in Fedora 37 (Rawhide): > > > > drivers/net/mlx5/linux/mlx5_ethdev_os.c:1137:52: error: > > 'fscanf' may overflow; destination buffer in argument 3 has size 16, > > but the corresponding specifier may require size 17 > > [-Werror,-Wfortify-source] > > ret = fscanf(file, "%" RTE_STR(IF_NAMESIZE) "s", port_name); > > Some other patches are proposing to declare the variable > of size IF_NAMESIZE+1 but I think it's wrong because > IF_NAMESIZE includes a terminating null byte. Ack, I rejected my patch accordingly. -- David Marchand