From patchwork Mon Apr 11 21:50:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: maksim.rayskiy@gmail.com X-Patchwork-Id: 90660 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 01E89B6F08 for ; Tue, 12 Apr 2011 07:54:11 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1Q9P2B-0002lp-Bg; Mon, 11 Apr 2011 21:52:35 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1Q9P29-00027l-NL; Mon, 11 Apr 2011 21:52:33 +0000 Received: from mms3.broadcom.com ([216.31.210.19]) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1Q9P26-00027V-Lx for linux-mtd@lists.infradead.org; Mon, 11 Apr 2011 21:52:31 +0000 Received: from [10.9.200.131] by MMS3.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.2)); Mon, 11 Apr 2011 14:55:10 -0700 X-Server-Uuid: B55A25B1-5D7D-41F8-BC53-C57E7AD3C201 Received: from mail-irva-13.broadcom.com (10.11.16.103) by IRVEXCHHUB01.corp.ad.broadcom.com (10.9.200.131) with Microsoft SMTP Server id 8.2.247.2; Mon, 11 Apr 2011 14:52:15 -0700 Received: from stb-bld-00.broadcom.com (stb-bld-00 [10.13.134.27]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id AC20B74D03; Mon, 11 Apr 2011 14:52:15 -0700 (PDT) From: maksim.rayskiy@gmail.com To: linux-mtd@lists.infradead.org Subject: [PATCH] Fix gcc-4.5.2 "statement with no effect" warnings in UBIFS Date: Mon, 11 Apr 2011 14:50:59 -0700 Message-ID: <1302558659-29472-1-git-send-email-maksim.rayskiy@gmail.com> X-Mailer: git-send-email 1.7.3.2 MIME-Version: 1.0 X-WSS-ID: 61BDA7343I89853115-01-01 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110411_175230_962016_3519712A X-CRM114-Status: UNSURE ( 9.53 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.2 (+) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is freemail (maksim.rayskiy[at]gmail.com) 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED 1.2 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL Cc: Maksim Rayskiy X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Maksim Rayskiy When compiling UBIFS with CONFIG_UBIFS_FS_DEBUG not set, gcc-4.5.2 generates a slew of "warning: statement with no effect" on references to non-void functions defined as 0. To avoid these warnings, change appropriate definitions from #define dbg_xxx(a) 0 to #define dbg_xxx(a) ({0; }) Signed-off-by: Maksim Rayskiy --- fs/ubifs/debug.h | 50 +++++++++++++++++++++++++------------------------- 1 files changed, 25 insertions(+), 25 deletions(-) diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h index 919f0de..e30a629 100644 --- a/fs/ubifs/debug.h +++ b/fs/ubifs/debug.h @@ -425,34 +425,34 @@ void dbg_debugfs_exit_fs(struct ubifs_info *c); #define dbg_dump_index(c) ({}) #define dbg_dump_lpt_lebs(c) ({}) -#define dbg_walk_index(c, leaf_cb, znode_cb, priv) 0 -#define dbg_old_index_check_init(c, zroot) 0 +#define dbg_walk_index(c, leaf_cb, znode_cb, priv) ({0; }) +#define dbg_old_index_check_init(c, zroot) ({0; }) #define dbg_save_space_info(c) ({}) -#define dbg_check_space_info(c) 0 -#define dbg_check_old_index(c, zroot) 0 -#define dbg_check_cats(c) 0 -#define dbg_check_ltab(c) 0 -#define dbg_chk_lpt_free_spc(c) 0 -#define dbg_chk_lpt_sz(c, action, len) 0 -#define dbg_check_synced_i_size(inode) 0 -#define dbg_check_dir_size(c, dir) 0 -#define dbg_check_tnc(c, x) 0 -#define dbg_check_idx_size(c, idx_size) 0 -#define dbg_check_filesystem(c) 0 +#define dbg_check_space_info(c) ({0; }) +#define dbg_check_old_index(c, zroot) ({0; }) +#define dbg_check_cats(c) ({0; }) +#define dbg_check_ltab(c) ({0; }) +#define dbg_chk_lpt_free_spc(c) ({0; }) +#define dbg_chk_lpt_sz(c, action, len) ({0; }) +#define dbg_check_synced_i_size(inode) ({0; }) +#define dbg_check_dir_size(c, dir) ({0; }) +#define dbg_check_tnc(c, x) ({0; }) +#define dbg_check_idx_size(c, idx_size) ({0; }) +#define dbg_check_filesystem(c) ({0; }) #define dbg_check_heap(c, heap, cat, add_pos) ({}) -#define dbg_check_lprops(c) 0 -#define dbg_check_lpt_nodes(c, cnode, row, col) 0 -#define dbg_check_inode_size(c, inode, size) 0 -#define dbg_check_data_nodes_order(c, head) 0 -#define dbg_check_nondata_nodes_order(c, head) 0 -#define dbg_force_in_the_gaps_enabled 0 -#define dbg_force_in_the_gaps() 0 -#define dbg_failure_mode 0 - -#define dbg_debugfs_init() 0 +#define dbg_check_lprops(c) ({0; }) +#define dbg_check_lpt_nodes(c, cnode, row, col) ({0; }) +#define dbg_check_inode_size(c, inode, size) ({0; }) +#define dbg_check_data_nodes_order(c, head) ({0; }) +#define dbg_check_nondata_nodes_order(c, head) ({0; }) +#define dbg_force_in_the_gaps_enabled ({0; }) +#define dbg_force_in_the_gaps() ({0; }) +#define dbg_failure_mode ({0; }) + +#define dbg_debugfs_init() ({0; }) #define dbg_debugfs_exit() -#define dbg_debugfs_init_fs(c) 0 -#define dbg_debugfs_exit_fs(c) 0 +#define dbg_debugfs_init_fs(c) ({0; }) +#define dbg_debugfs_exit_fs(c) ({0; }) #endif /* !CONFIG_UBIFS_FS_DEBUG */ #endif /* !__UBIFS_DEBUG_H__ */