Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3716735pxk; Tue, 29 Sep 2020 04:38:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvWZl+W+NvfVS4+SRYgg4XycKhz2UmkKEYGmrecH8u1T4Vs4p8uo42oqn8w1L+x5MT3ugi X-Received: by 2002:a17:906:b28d:: with SMTP id q13mr3336128ejz.378.1601379511331; Tue, 29 Sep 2020 04:38:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601379511; cv=none; d=google.com; s=arc-20160816; b=mxqynA6T7nVCRj6v3H+ad5ehFWE6Qn+7lhB4t1Vj162vEu3pxZAYFLJ9s+q2YjqBAY yh186y1FDB6biLVUsu2jhAM4s4XJeDVZaBOHS56FtTAdtOX0732sU6ekqf3LVDpB63n+ zVV4cSV2Qmx4p7pSWCthOA2GNcwSNilwn+Kjk4cirO2DqKRu8gwwmAYw6ev+wWh1854p VvH3DKZpFaN2XZxe7ydnSkxf5dk58K+rPxgdYLIFkZdwgtbZaN+45Sn0awXdCB/q0t0j nqvPrsCgwTkr0wIMUB0NizXgFAUfiflPEprLMdGLJ2d0AC52qrtdSAA7+dCRJn6cH4aG EfTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :subject:cc:to:from:date:message-id:mime-version:dkim-signature; bh=HVb5LyBGgi3fU77zrxjv0Gn2ESkyJHXWAtQJVfno9vY=; b=kQqf+CQD6BxmlOqYvhmBe4m35YuHT7Uywu7azX9ZlqoItNeRSyj3hVe8QLgzZuKQ/B WrawXZgDi3Bp/FQ2OIwAGweZgyPen/QA/oPlgaBaRB+2WsCtIeTDmhK8l3hxlhJBijzH uskTIgNfjyMBzbsQ5MsRtp1g7CvHUD/DRQJZ5XJ7gFAArCbc5xGk8TSGJ5tnIJTpLFvZ jy8tF3y8MMFtwI/l2UByhDbon/B/ulew3bA1E8kcvbf37v0LgVdNv7W9QAZlujFfNy/P W0KMaKhCjanlWKoasRkKC4FMthVwKuA9jk2X2rQstsUQJJUe4fvtYiJuTYie4a4ATfTK n+CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=mA1TO9XK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d11si2566565edu.492.2020.09.29.04.38.08; Tue, 29 Sep 2020 04:38:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=mA1TO9XK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728488AbgI2Le3 (ORCPT + 99 others); Tue, 29 Sep 2020 07:34:29 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:46236 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729620AbgI2Ld1 (ORCPT ); Tue, 29 Sep 2020 07:33:27 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08TBORjQ163313; Tue, 29 Sep 2020 11:33:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=HVb5LyBGgi3fU77zrxjv0Gn2ESkyJHXWAtQJVfno9vY=; b=mA1TO9XK9CFlHIQ1Yun1Dnxw6N9cPBw5zNjBXPKLstW5CEK/dCMyjqHZwn1UJUWLL/P/ jTp3pOYAXd2XxG3lhmwYu+9gNyPRBLsbWNG2C0qUa/aLZqAHvhO5slRvkQQMXdEYhK4Y L0r0k5OaaMZo52ijgFKoZ+wCZWi5AeE+fF4YdhMvUQnvAprlNese8j3GFylPmhQ4tux/ +sl5yJIH7vdH652YMp8LBEjgJPZqUeFuimTGztbVxqy2v+Y+QkPM1Z4wHo0xqA+D7gvD NuF+Tf2yIb34NM9e09QfdmSWXfp09a+YLngpiT4zDxi4ztlrkjxZqOELC1L/5pzS267g ig== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2130.oracle.com with ESMTP id 33su5at8h9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 29 Sep 2020 11:33:11 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08TBUpIB173331; Tue, 29 Sep 2020 11:33:11 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 33uv2drd3n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Sep 2020 11:33:10 +0000 Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08TBX9K5015999; Tue, 29 Sep 2020 11:33:09 GMT Received: from localhost.uk.oracle.com (/10.175.172.184) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 29 Sep 2020 04:32:47 -0700 MIME-Version: 1.0 Message-ID: <1601379151-21449-2-git-send-email-alan.maguire@oracle.com> Date: Tue, 29 Sep 2020 04:32:30 -0700 (PDT) From: Alan Maguire To: ast@kernel.org, daniel@iogearbox.net, andriin@fb.com Cc: kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@chromium.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH bpf-next 1/2] selftests/bpf: fix unused-result warning in snprintf_btf.c References: <1601379151-21449-1-git-send-email-alan.maguire@oracle.com> In-Reply-To: <1601379151-21449-1-git-send-email-alan.maguire@oracle.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9758 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 adultscore=0 suspectscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009290103 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9758 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 lowpriorityscore=0 spamscore=0 clxscore=1015 mlxscore=0 impostorscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009290102 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Daniel reports: + system("ping -c 1 127.0.0.1 > /dev/null"); This generates the following new warning when compiling BPF selftests: [...] EXT-OBJ [test_progs] cgroup_helpers.o EXT-OBJ [test_progs] trace_helpers.o EXT-OBJ [test_progs] network_helpers.o EXT-OBJ [test_progs] testing_helpers.o TEST-OBJ [test_progs] snprintf_btf.test.o /root/bpf-next/tools/testing/selftests/bpf/prog_tests/snprintf_btf.c: In function ‘test_snprintf_btf’: /root/bpf-next/tools/testing/selftests/bpf/prog_tests/snprintf_btf.c:30:2: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result] system("ping -c 1 127.0.0.1 > /dev/null"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [...] Fixes: 076a95f5aff2 ("selftests/bpf: Add bpf_snprintf_btf helper tests") Reported-by: Daniel Borkmann Signed-off-by: Alan Maguire --- tools/testing/selftests/bpf/prog_tests/snprintf_btf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/prog_tests/snprintf_btf.c b/tools/testing/selftests/bpf/prog_tests/snprintf_btf.c index 3a8ecf8..3c63a70 100644 --- a/tools/testing/selftests/bpf/prog_tests/snprintf_btf.c +++ b/tools/testing/selftests/bpf/prog_tests/snprintf_btf.c @@ -27,7 +27,7 @@ void test_snprintf_btf(void) goto cleanup; /* generate receive event */ - system("ping -c 1 127.0.0.1 > /dev/null"); + (void) system("ping -c 1 127.0.0.1 > /dev/null"); if (bss->skip) { printf("%s:SKIP:no __builtin_btf_type_id\n", __func__); -- 1.8.3.1