From patchwork Wed Jun 27 20:22:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10492599 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C9CB560386 for ; Wed, 27 Jun 2018 20:22:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1EB1298F5 for ; Wed, 27 Jun 2018 20:22:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C614929D1F; Wed, 27 Jun 2018 20:22:36 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 54E0A298F5 for ; Wed, 27 Jun 2018 20:22:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934507AbeF0UWf (ORCPT ); Wed, 27 Jun 2018 16:22:35 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:54374 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934541AbeF0UWf (ORCPT ); Wed, 27 Jun 2018 16:22:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1530130955; x=1561666955; h=from:to:cc:subject:date:message-id; bh=lzZrM4S9e66mmHbw7FxIAuYXczJNRv/XHmnaFhduUnE=; b=cPq5TT2Du8P+krZ6unJncClcHVuJ6GyxZHn6QGpbY849P27zriRIxv6V WDgBKfMhrnm28ZxBA5V+kDXJme6eamn2TA7CQYyf8ESsQ5WpMI/f1HVEe 0GCsyrh0iPO8FnuPc4hYqDGRClD8Jun3q/u7jnlnqWvSols+FRzzXtTOs 1xKVRNCXgonnL8Bi4WxiZbs9Nteeu32r0ajUFY7HrArNveYYDxgmuysB5 aOh78wUwSNWY5fXV4p4TP6A0QamSE/rqHX/3hrBGZPfNX4hbhvYOX5bsX 19pTfPj1xbS0r59Y9hSodlKoWd9QJZumXSt2+U+vUFjNUtfpL0wpp+YQc g==; X-IronPort-AV: E=Sophos;i="5.51,280,1526313600"; d="scan'208";a="84783644" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 28 Jun 2018 04:22:35 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 27 Jun 2018 13:11:51 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip02.wdc.com with ESMTP; 27 Jun 2018 13:22:34 -0700 From: Bart Van Assche To: Jens Axboe Cc: linux-block@vger.kernel.org, Christoph Hellwig , Bart Van Assche Subject: [PATCH] include/trace/events/wbt.h: Suppress a compiler warning Date: Wed, 27 Jun 2018 13:22:34 -0700 Message-Id: <20180627202234.17670-1-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.17.1 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch avoids that the following warning appears when building with gcc 8 and W=1: ./include/trace/events/wbt.h:36:3: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation] Signed-off-by: Bart Van Assche --- include/trace/events/wbt.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/trace/events/wbt.h b/include/trace/events/wbt.h index b048694070e2..29ec58adfddd 100644 --- a/include/trace/events/wbt.h +++ b/include/trace/events/wbt.h @@ -8,6 +8,9 @@ #include #include "../../../block/blk-wbt.h" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-truncation" + /** * wbt_stat - trace stats for blk_wb * @stat: array of read/write stats @@ -148,6 +151,8 @@ TRACE_EVENT(wbt_timer, __entry->status, __entry->step, __entry->inflight) ); +#pragma GCC diagnostic pop + #endif /* _TRACE_WBT_H */ /* This part must be outside protection */