From patchwork Fri Dec 7 06:23:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10717503 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 80EB714E2 for ; Fri, 7 Dec 2018 06:23:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EBA32EB2F for ; Fri, 7 Dec 2018 06:23:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 618662EB33; Fri, 7 Dec 2018 06:23:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 151582EB2F for ; Fri, 7 Dec 2018 06:23:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725978AbeLGGXa (ORCPT ); Fri, 7 Dec 2018 01:23:30 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:56314 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725952AbeLGGXa (ORCPT ); Fri, 7 Dec 2018 01:23:30 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wB76J1fT111722; Fri, 7 Dec 2018 06:23:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=c2gf9OyeeVcgIARqP4d0ppJwNicXLRI22E3vP0Qsua0=; b=Xbyb0r8cSssspAS/uXYo3BUsKtb7ACoDjpglYwVvvqLJNSzwpMMXZtjszwGtDWiO6jMb tJU1m+iZq5QTNrAYUMdB3gM5AwFOmSI2+97LFBDOHlHR0QO0yLscX+QMfS75O3ZXr8my F4+/JAhnG6hyxFhdOhWYFAJPFUfGTKQrmY78AYjW3nkn3IIQIeuubw/NNBevkWGlp0Ut DVRF9APNKNJpthyk/2rqfl+ET8oANz0szM06ioBIlSbzHeF5szUj3kKwVkwzdk3fpScZ oCdqbBL8A6D7L/UG4c5qEkS5v0NjrfwE2tTYAd1pZcCytHB/5IM73mCqvYV5Q3OBqJPB 9Q== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2p3jxrv0t9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 07 Dec 2018 06:23:28 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wB76NRro016329 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 7 Dec 2018 06:23:28 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wB76NRWi027412; Fri, 7 Dec 2018 06:23:27 GMT Received: from localhost (/10.159.153.113) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 06 Dec 2018 22:23:27 -0800 Subject: [PATCH 01/12] fsstress: fix compiler warnings From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, Allison Henderson , fstests@vger.kernel.org Date: Thu, 06 Dec 2018 22:23:18 -0800 Message-ID: <154416379882.15344.9436421202591701307.stgit@magnolia> In-Reply-To: <154416379233.15344.4377231692638417530.stgit@magnolia> References: <154416379233.15344.4377231692638417530.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9099 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=812 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812070054 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Fix all the gcc warnings in fsstress, and resize buffers to avoid overflows. Signed-off-by: Darrick J. Wong Reviewed-By: Allison Henderson --- ltp/fsstress.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ltp/fsstress.c b/ltp/fsstress.c index edbb3f2f..8d0734fc 100644 --- a/ltp/fsstress.c +++ b/ltp/fsstress.c @@ -499,7 +499,7 @@ int main(int argc, char **argv) exit(1); } if (logname) { - char path[PATH_MAX]; + char path[PATH_MAX + NAME_MAX + 1]; snprintf(path, sizeof(path), "%s/%s", rpath, logname); if (freopen(path, "a", stdout) == NULL) { perror("freopen logfile failed"); @@ -583,7 +583,7 @@ int main(int argc, char **argv) return 0; #endif if (logname) { - char path[PATH_MAX]; + char path[PATH_MAX + NAME_MAX + 2 + 11]; snprintf(path, sizeof(path), "%s/%s.%d", rpath, logname, i); if (freopen(path, "a", stdout) == NULL) {