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 7BCF2A0548; Wed, 15 Jun 2022 10:41:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6B3A44281C; Wed, 15 Jun 2022 10:41:40 +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 649CB40220 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=1655282498; 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=P45O+1+e09sarkcTVLlWkdLD1DAaQEA2RukADbMWLWVgPLgjms66YiD5Esta1wjv4QMtXD B9TboBHwdy9TIOwWgOWrZlatDxCgyjts5ovjC69tjV1djdZCqg2VmuCUZxyccRnIahhUbv SQIQrecg2gd4n9XyzXqPQYkhGeA4KNs= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-418-1EdB_JXqOaeKQ437ObQmbQ-1; Wed, 15 Jun 2022 04:41:36 -0400 X-MC-Unique: 1EdB_JXqOaeKQ437ObQmbQ-1 Received: by mail-lj1-f199.google.com with SMTP id by31-20020a05651c1a1f00b00258e4d37520so1720507ljb.20 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=YdXBf1xSHy26KDZeqe0J+CR4/LfrgaP1ztLpBHZ0RaMwYEomuGtV+GDDufbUbM3qUi ExBMbX7/9lCZZzQD0wyr6Iix1rwZ4uLtCJ0yD+16SxfqNAQFOl4DSu11sVGt4jzKfrRz X7YJ6UZd+8ATzyODRrmWVLINfN5zwQWbGFguzzQhBri4Mf95Jtj0l2njg1EZ71rW2mhN YtkGlQY3LBwWH4r1Ft70nucTGSLdM0fUuqgJ8jibiynCfe9cpcXFh67Oo2RS7RizEgy9 mZGD+ZzpV9zVllYW0yJXMvh+BEUDdzo5HA03HzG5AvYgKtDHcw1exaPSOcptf6w8paOD HLBw== X-Gm-Message-State: AJIora+a6spHfbdXbEIVL7YSENPq4bJW74fvnT8MVLpqBtChNzHTxeQs m8o4XmJJugqVYBoRNzWBK89v9rUnuAowPOnsODtJPw/nu0pVp9KSGkdsY+iF5VoR3O8dgT8MyAH kZ4k7S5QV4zCdenYi0uU= X-Received: by 2002:a2e:3613:0:b0:258:e0cc:d83b with SMTP id d19-20020a2e3613000000b00258e0ccd83bmr4627443lja.297.1655282494475; 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: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-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