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 608BFA055A; Thu, 27 Feb 2020 11:58:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B04CA2C4F; Thu, 27 Feb 2020 11:58:02 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id BDBF93B5 for ; Thu, 27 Feb 2020 11:58:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582801081; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5cRA0KALxxcdulIsz3TPwydCX7Svl9hIaXudWfs0QBI=; b=OHLNAaXl1Xi2kLVn0sW+kRgZio4QJXGoHrXXn3/IhjnLt1vPUMyRzXP1QAxqTYqY2yDUN2 kP6aiJkh/yyHah/mZ4yJwAL/N37Lrq4svD6+tFysJHcFwxAtIy+RmRA+CahNgRuKm56VLB vcj8gM3W24ScKfbY270x4HNMZcRaxXw= Received: from mail-ua1-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-rlmf5mkkMMaGMhvnWB1uww-1; Thu, 27 Feb 2020 05:57:59 -0500 X-MC-Unique: rlmf5mkkMMaGMhvnWB1uww-1 Received: by mail-ua1-f70.google.com with SMTP id d26so631668uak.13 for ; Thu, 27 Feb 2020 02:57:59 -0800 (PST) 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=5cRA0KALxxcdulIsz3TPwydCX7Svl9hIaXudWfs0QBI=; b=sy6t+D6k3FhxaVJT2s2Ix6S5Y5rfQGabClAgzQ14cugJWM2KkQ5tkHKpUPiYhFa8t3 UOyKhlT1yEgCPzyYaqe1pU6Y80cDcVKZIwvT7vOxH5KIhmKUE+JYRPwQbhxn3z5oo4IU qZWv8N0Vw8+XaWcE5T3/FvT8c6OWFVk0eePr6vMKpFDa7lwGhCgiEgH0u09CsipGF1p+ KkbQjGWphS9xmlFSTgJWNkAtt8YiXxkvCGq2DAOCaTrR1v5MiDjsA1WpE/ACZfAOZ77C uZQ89GOY1A3lOxziWBJpTBLFzlPqc/6G+FdZfFEi4Mm4EW256yEZaXFG0rAPGunFQkBn NiGw== X-Gm-Message-State: APjAAAWXKUOKimBt+yWb9oP5jougm8kn7VII8u7rFdX85XMqftlYU+d1 YgWtAVIr+XNgfxhdcaLFNSwHlTTQhaZImlQH/TDqDwv4rINMcPov8AA62mo64ickKkj3QZNJO+6 w8AzfjUfCH+RgZzjbeRw= X-Received: by 2002:ab0:488b:: with SMTP id x11mr2116819uac.86.1582801079167; Thu, 27 Feb 2020 02:57:59 -0800 (PST) X-Google-Smtp-Source: APXvYqxqqRD1rFCqniEDpHkhscwyh/Y2NwNr7kgnbCSflSswX4n0rNc/ZUb/8EOSnmxjWAkzNULwM/FH2o2FwzgNtVw= X-Received: by 2002:ab0:488b:: with SMTP id x11mr2116810uac.86.1582801078828; Thu, 27 Feb 2020 02:57:58 -0800 (PST) MIME-Version: 1.0 References: <20200227082506.25349-1-skori@marvell.com> In-Reply-To: <20200227082506.25349-1-skori@marvell.com> From: David Marchand Date: Thu, 27 Feb 2020 11:57:46 +0100 Message-ID: To: Sunil Kumar Kori Cc: Olivier Matz , Thomas Monjalon , dev , dpdk stable X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] 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 Thu, Feb 27, 2020 at 9:25 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); > | ~~~~~~~~~~~~~~~~~~ > Good catch. Just to understand, how did you catch it? Extra cflags? specific compiler? > Fixes: 7f0bb634a140 ("log: add ability to match log type with globbing") Missing Cc: stable. > > Signed-off-by: Sunil Kumar Kori > --- > 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 > Acked-by: David Marchand -- David Marchand