From patchwork Tue Jan 29 20:34:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Dickson X-Patchwork-Id: 10787217 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 0D3451390 for ; Tue, 29 Jan 2019 20:35:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F02372D4AB for ; Tue, 29 Jan 2019 20:35:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E240A2DA79; Tue, 29 Jan 2019 20:35:02 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 7E0812DA65 for ; Tue, 29 Jan 2019 20:35:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727388AbfA2UfB (ORCPT ); Tue, 29 Jan 2019 15:35:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:2251 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727010AbfA2UfB (ORCPT ); Tue, 29 Jan 2019 15:35:01 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B248D58E23 for ; Tue, 29 Jan 2019 20:35:01 +0000 (UTC) Received: from steved.boston.devel.redhat.com (ovpn-116-222.phx2.redhat.com [10.3.116.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id 656065C239 for ; Tue, 29 Jan 2019 20:35:01 +0000 (UTC) From: Steve Dickson To: Linux NFS Mailing list Subject: [PATCH] nfs-utils: Removed new error=format-overflow=2 errors Date: Tue, 29 Jan 2019 15:34:59 -0500 Message-Id: <20190129203459.38815-1-steved@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 29 Jan 2019 20:35:01 +0000 (UTC) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With the latest C99-compliant gcc printf, sprintf, etc now only support up to 4k in buffer sizes. There were only a couple places that had to change to not violated this new restriction Signed-off-by: Steve Dickson --- utils/blkmapd/device-discovery.c | 2 +- utils/mount/error.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/blkmapd/device-discovery.c b/utils/blkmapd/device-discovery.c index 3a202e0..2ce60f8 100644 --- a/utils/blkmapd/device-discovery.c +++ b/utils/blkmapd/device-discovery.c @@ -239,7 +239,7 @@ int bl_discover_devices(void) { FILE *f; int n; - char buf[PATH_MAX], devname[PATH_MAX], fulldevname[PATH_MAX+NAME_MAX]; + char buf[PATH_MAX], devname[NAME_MAX], fulldevname[PATH_MAX]; /* release previous list */ bl_release_disk(); diff --git a/utils/mount/error.c b/utils/mount/error.c index dfe5c7d..562f312 100644 --- a/utils/mount/error.c +++ b/utils/mount/error.c @@ -50,8 +50,8 @@ extern char *progname; -static char errbuf[BUFSIZ]; -static char *erreob = &errbuf[BUFSIZ]; +static char errbuf[PATH_MAX]; +static char *erreob = &errbuf[PATH_MAX]; /* Convert RPC errors into strings */ static int rpc_strerror(int spos)