From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 67712A052E; Mon, 9 Mar 2020 08:08:40 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 31A621C002; Mon, 9 Mar 2020 08:08:39 +0100 (CET) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by dpdk.org (Postfix) with ESMTP id AAEC1FEB; Mon, 9 Mar 2020 08:08:37 +0100 (CET) Received: by mail-io1-f65.google.com with SMTP id h8so8117245iob.2; Mon, 09 Mar 2020 00:08:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=PRP9xA0tGsPdld1OcFIdcU4/lV3b7K/YZFkoYR1lm+E=; b=NmhtH5MJE73wngOEVHTibv2+DhJPXd7BHzpZk7x9cHT1MGuO/GzNtGbntIpXgTsMF0 xbfii8YRQTlLL1lzl17ExQ67tEyiRaHVf3f/Mdm4sFg+5VXDgEyUqVJvdpdI5dNxrvzA e8R/CNV3VvdwANIfaixhqG23NGTwP0Ekqz5i9hsHUUSYmEhXT/k5GH/t7YWnc8QLiNqq +B4+skszvqAOLqvOZVPl6wicB3D557WFdeSQhy4eaOtjS67X95Oyn8c9/bRUz6IsNZlA dDpsFeVxzxzSIITej5keeov601mEMInADMbpRegbnBZmCTNFNI+pBRwpYRg2FnqO+I42 WkZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=PRP9xA0tGsPdld1OcFIdcU4/lV3b7K/YZFkoYR1lm+E=; b=nHnGBkQvsrq82SNvbKuGL5r2bFOCkeOJWUYe21nTQZa4uLOGgSIiaGh084L3NbtSk6 mwLDkZiBQVLCh0bcs4GWW0M54FYsbKWYHbRBPgg8lTtzZE2F0w7p772SIUFL4b5+BZCq jipnJqIX8uglKPjkrIRY+2oyikcm3aWWx5kvy7T96qj4xNY3hnJCkl0JvQPkJM3MJIvZ kaxIA+5FQU93IXtuiks9BJlQzMMgQm1OPeYXbkdmOSnttF1U/h5QzyqKDatyOi7s159j O3ekmCHsUAJm/z4gmPGRr2xJ3gM8GsC/ZL21DM0Zfd/RipNeViETYIHk1aghUd44+dJd m2lw== X-Gm-Message-State: ANhLgQ1m1/Bdymv/r3lHNwWJBKpojHEZWLWWLEM5u+khbGoHp8VBXgzl YUMrTYPYzwwvzjXza1IEuln4a1GOBDbpeJ0BVpU= X-Google-Smtp-Source: ADFU+vsFikTpbFXnwOLB5tXHP2HuV7y+F1DjczjtBwFFzlFKhfJpe3t6HnUJnBTA8sGP+rB4glmPdQs3zDll3Nx6YOA= X-Received: by 2002:a5d:8796:: with SMTP id f22mr12256323ion.163.1583737716923; Mon, 09 Mar 2020 00:08:36 -0700 (PDT) MIME-Version: 1.0 References: <20200227082506.25349-1-skori@marvell.com> <20200309061723.19732-1-skori@marvell.com> In-Reply-To: <20200309061723.19732-1-skori@marvell.com> From: Jerin Jacob Date: Mon, 9 Mar 2020 12:38:20 +0530 Message-ID: To: Sunil Kumar Kori Cc: Olivier Matz , Thomas Monjalon , David Marchand , dpdk-dev , dpdk stable Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v2 1/1] eal: fix log message print for regex X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Mar 9, 2020 at 11:47 AM Sunil Kumar Kori wrote: > > If user passes log-level eal parameter to enable log level based on regex > then in case of error message is being printed for pattern match instead = of > regex. Following is the warning message thrown: > > Compiling C object 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common= _options.c.o'. > In function =E2=80=98eal_parse_log_level=E2=80=99, > inlined from =E2=80=98eal_parse_common_option=E2=80=99 at ../lib/librt= e_eal/common/eal_common_options.c:1418:7: > ../lib/librte_eal/common/eal_common_options.c:1053:4: warning: =E2=80=98%= s=E2=80=99 directive argument is null [-Wformat-overflow=3D] > 1053 | fprintf(stderr, "cannot set log level %s,%d\n", > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 1054 | pattern, priority); > | ~~~~~~~~~~~~~~~~~~ > > Fixes: 7f0bb634a140 ("log: add ability to match log type with globbing") > Cc: stable@dpdk.org > > Signed-off-by: Sunil Kumar Kori > Acked-by: David Marchand Reviewed-by: Jerin Jacob > --- > v2: > - Updated Cc: stable@dpdk.org in commit message > > lib/librte_eal/common/eal_common_options.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/= common/eal_common_options.c > index 75974dd5b..525e51e7d 100644 > --- a/lib/librte_eal/common/eal_common_options.c > +++ b/lib/librte_eal/common/eal_common_options.c > @@ -1046,7 +1046,7 @@ eal_parse_log_level(const char *arg) > if (regex) { > if (rte_log_set_level_regexp(regex, priority) < 0) { > fprintf(stderr, "cannot set log level %s,%d\n", > - pattern, priority); > + regex, priority); > goto fail; > } > if (rte_log_save_regexp(regex, priority) < 0) > -- > 2.17.1 >