From patchwork Tue Apr 20 13:09:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 91877 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 23BA0A0548; Tue, 20 Apr 2021 15:09:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 061AB41749; Tue, 20 Apr 2021 15:09:44 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 8D0A741735 for ; Tue, 20 Apr 2021 15:09:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618924181; 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; bh=KTf81cF2JQhSMMLFKxgp5p6uE6J6Q9i7n0JFQV5QtkQ=; b=fH0mlVfEabyLZ9CV0FYToEgovJsmMeCd8JPpF3K+iVf2tf8GEca4fsI6kXRXO8sUhyTFWJ CDRVjyUI6lUZZzQ8fru1+bPQyEgastum3dOX0L3N1BIjiehxUwTUvZeGCSOlhYKIE6tx5i Haj5qMHdnqnZJs72AOs8qrxbunetPDQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-265-pQv8hqCBMp62lHiSvvMYZw-1; Tue, 20 Apr 2021 09:09:39 -0400 X-MC-Unique: pQv8hqCBMp62lHiSvvMYZw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0E59779EC1; Tue, 20 Apr 2021 13:09:38 +0000 (UTC) Received: from rh.Home (ovpn-112-162.ams2.redhat.com [10.36.112.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF54B610F1; Tue, 20 Apr 2021 13:09:36 +0000 (UTC) From: Kevin Traynor To: dev@dpdk.org Cc: Kevin Traynor , Olivier Matz Date: Tue, 20 Apr 2021 14:09:14 +0100 Message-Id: <20210420130915.166692-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH 1/2] app/test: fix clang 12 warning 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 Sender: "dev" clang 12 gives a warning about string size. In this case it looks like it was unintentional to concatenate the strings. Separate with a comma. $ clang --version clang version 12.0.0 (Fedora 12.0.0-0.3.rc1.fc34) [2557/2719] Compiling C object app/test/dpdk-test.p/test_cmdline_ipaddr.c.o ../app/test/test_cmdline_ipaddr.c:259:3: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation] "random invalid text", ^ ../app/test/test_cmdline_ipaddr.c:258:3: note: place parentheses around the string literal to silence warning "1234:1234:1234:1234:1234:1234:1234:1234:1234:1234:1234" ^ Signed-off-by: Kevin Traynor --- app/test/test_cmdline_ipaddr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c index b3f50d80d2..2a1ee120fc 100644 --- a/app/test/test_cmdline_ipaddr.c +++ b/app/test/test_cmdline_ipaddr.c @@ -256,5 +256,5 @@ const char * ipaddr_invalid_strs[] = { /* too long */ - "1234:1234:1234:1234:1234:1234:1234:1234:1234:1234:1234" + "1234:1234:1234:1234:1234:1234:1234:1234:1234:1234:1234", "random invalid text", "", From patchwork Tue Apr 20 13:09:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 91878 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4E29BA0548; Tue, 20 Apr 2021 15:10:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3B72E417C5; Tue, 20 Apr 2021 15:10:26 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 32AF041735 for ; Tue, 20 Apr 2021 15:10:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618924223; 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=B8FwbY6ATrMm7RrbpjmuUzFh0cW5LpoTHMzzKCOKz0g=; b=aWAgqWT3nntpq/O0ixjbh52lxxFyPqCVMF4RvJ2DjT6Nq24oUGSrNJWFXSpz5pnp0A5w4c YCQwdVME1HQPUM0eB9Wdn7kh9505uAL42OMaK9V1fDHD6GpgK7O8uZ1VmGoB/rEH0EW6U2 TGLI6TU5v45bz3HVPbiE+RCZszmYfJ0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-423-An1HWfp5OgK7-ZhBGxR1SQ-1; Tue, 20 Apr 2021 09:09:43 -0400 X-MC-Unique: An1HWfp5OgK7-ZhBGxR1SQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A282D83DD24; Tue, 20 Apr 2021 13:09:42 +0000 (UTC) Received: from rh.Home (ovpn-112-162.ams2.redhat.com [10.36.112.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9B8AB610F1; Tue, 20 Apr 2021 13:09:41 +0000 (UTC) From: Kevin Traynor To: dev@dpdk.org Cc: Kevin Traynor , Olivier Matz Date: Tue, 20 Apr 2021 14:09:15 +0100 Message-Id: <20210420130915.166692-2-ktraynor@redhat.com> In-Reply-To: <20210420130915.166692-1-ktraynor@redhat.com> References: <20210420130915.166692-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH 2/2] app/test: silence clang 12 warning 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 Sender: "dev" clang 12 gives a warning about string size. In this case it is a long string test. Add parentheses to indicate this. $ clang --version clang version 12.0.0 (Fedora 12.0.0-0.3.rc1.fc34) [2556/2719] Compiling C object app/test/dpdk-test.p/test_cmdline_num.c.o ../app/test/test_cmdline_num.c:204:5: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation] "1111000011110000111100001111000011110000111100001111000011110000", ^ ../app/test/test_cmdline_num.c:203:3: note: place parentheses around the string literal to silence warning "0b1111000011110000111100001111000011110000111100001111000011110000" ^ Signed-off-by: Kevin Traynor --- app/test/test_cmdline_num.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test/test_cmdline_num.c b/app/test/test_cmdline_num.c index ec479cdb3a..9276de59bd 100644 --- a/app/test/test_cmdline_num.c +++ b/app/test/test_cmdline_num.c @@ -201,6 +201,6 @@ const char * num_invalid_strs[] = { "-0b0111010101", /* too long (128+ chars) */ - "0b1111000011110000111100001111000011110000111100001111000011110000" - "1111000011110000111100001111000011110000111100001111000011110000", + ("0b1111000011110000111100001111000011110000111100001111000011110000" + "1111000011110000111100001111000011110000111100001111000011110000"), "1E3", "0A",