* [PATCH v2] Fix gcc-4.5.2 "statement with no effect" warnings in UBIFS
@ 2011-04-12 22:14 maksim.rayskiy
2011-04-12 22:42 ` Mike Frysinger
2011-04-13 8:26 ` Artem Bityutskiy
0 siblings, 2 replies; 9+ messages in thread
From: maksim.rayskiy @ 2011-04-12 22:14 UTC (permalink / raw)
To: linux-mtd, dedekind1, vapier.adi; +Cc: Maksim Rayskiy
From: Maksim Rayskiy <maksim.rayskiy@gmail.com>
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, replace #defines with dummy inline functions.
Signed-off-by: Maksim Rayskiy <maksim.rayskiy@gmail.com>
---
fs/ubifs/debug.h | 137 +++++++++++++++++++++++++++++++----------------------
1 files changed, 80 insertions(+), 57 deletions(-)
diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h
index 919f0de..4f6520e 100644
--- a/fs/ubifs/debug.h
+++ b/fs/ubifs/debug.h
@@ -23,6 +23,12 @@
#ifndef __UBIFS_DEBUG_H__
#define __UBIFS_DEBUG_H__
+/* Checking helper functions */
+typedef int (*dbg_leaf_callback)(struct ubifs_info *c,
+ struct ubifs_zbranch *zbr, void *priv);
+typedef int (*dbg_znode_callback)(struct ubifs_info *c,
+ struct ubifs_znode *znode, void *priv);
+
#ifdef CONFIG_UBIFS_FS_DEBUG
/**
@@ -270,11 +276,6 @@ void dbg_dump_tnc(struct ubifs_info *c);
void dbg_dump_index(struct ubifs_info *c);
void dbg_dump_lpt_lebs(const struct ubifs_info *c);
-/* Checking helper functions */
-typedef int (*dbg_leaf_callback)(struct ubifs_info *c,
- struct ubifs_zbranch *zbr, void *priv);
-typedef int (*dbg_znode_callback)(struct ubifs_info *c,
- struct ubifs_znode *znode, void *priv);
int dbg_walk_index(struct ubifs_info *c, dbg_leaf_callback leaf_cb,
dbg_znode_callback znode_cb, void *priv);
@@ -401,58 +402,80 @@ void dbg_debugfs_exit_fs(struct ubifs_info *c);
#define DBGKEY(key) ((char *)(key))
#define DBGKEY1(key) ((char *)(key))
-#define ubifs_debugging_init(c) 0
-#define ubifs_debugging_exit(c) ({})
-
-#define dbg_ntype(type) ""
-#define dbg_cstate(cmt_state) ""
-#define dbg_jhead(jhead) ""
-#define dbg_get_key_dump(c, key) ({})
-#define dbg_dump_inode(c, inode) ({})
-#define dbg_dump_node(c, node) ({})
-#define dbg_dump_lpt_node(c, node, lnum, offs) ({})
-#define dbg_dump_budget_req(req) ({})
-#define dbg_dump_lstats(lst) ({})
-#define dbg_dump_budg(c) ({})
-#define dbg_dump_lprop(c, lp) ({})
-#define dbg_dump_lprops(c) ({})
-#define dbg_dump_lpt_info(c) ({})
-#define dbg_dump_leb(c, lnum) ({})
-#define dbg_dump_znode(c, znode) ({})
-#define dbg_dump_heap(c, heap, cat) ({})
-#define dbg_dump_pnode(c, pnode, parent, iip) ({})
-#define dbg_dump_tnc(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_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_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_debugfs_exit()
-#define dbg_debugfs_init_fs(c) 0
-#define dbg_debugfs_exit_fs(c) 0
+static inline int ubifs_debugging_init(struct ubifs_info *c) { return 0; }
+static inline void ubifs_debugging_exit(struct ubifs_info *c) {}
+static inline const char *dbg_ntype(int type) { return ""; }
+static inline const char *dbg_cstate(int cmt_state) { return ""; }
+static inline const char *dbg_jhead(int jhead) { return ""; }
+static inline const char *dbg_get_key_dump(const struct ubifs_info *c,
+ const union ubifs_key *key) { return ""; }
+static inline void dbg_dump_inode(const struct ubifs_info *c,
+ const struct inode *inode) {}
+static inline void dbg_dump_node(const struct ubifs_info *c,
+ const void *node) {}
+static inline void dbg_dump_lpt_node(const struct ubifs_info *c,
+ void *node, int lnum, int offs) {}
+static inline void dbg_dump_budget_req(const struct ubifs_budget_req *req) {}
+static inline void dbg_dump_lstats(const struct ubifs_lp_stats *lst) {}
+static inline void dbg_dump_budg(struct ubifs_info *c) {}
+static inline void dbg_dump_lprop(const struct ubifs_info *c,
+ const struct ubifs_lprops *lp) {}
+static inline void dbg_dump_lprops(struct ubifs_info *c) {}
+static inline void dbg_dump_lpt_info(struct ubifs_info *c) {}
+static inline void dbg_dump_leb(const struct ubifs_info *c, int lnum) {}
+static inline void dbg_dump_znode(const struct ubifs_info *c,
+ const struct ubifs_znode *znode) {}
+static inline void dbg_dump_heap(struct ubifs_info *c,
+ struct ubifs_lpt_heap *heap, int cat) {}
+static inline void dbg_dump_pnode(struct ubifs_info *c,
+ struct ubifs_pnode *pnode, struct ubifs_nnode *parent, int iip) {}
+static inline void dbg_dump_tnc(struct ubifs_info *c) {}
+static inline void dbg_dump_index(struct ubifs_info *c) {}
+static inline void dbg_dump_lpt_lebs(const struct ubifs_info *c) {}
+
+static inline int dbg_walk_index(struct ubifs_info *c,
+ dbg_leaf_callback leaf_cb, dbg_znode_callback znode_cb, void *priv)
+ { return 0; }
+
+/* Checking functions */
+static inline void dbg_save_space_info(struct ubifs_info *c) {}
+static inline int dbg_check_space_info(struct ubifs_info *c) { return 0; }
+static inline int dbg_check_lprops(struct ubifs_info *c) { return 0; }
+static inline int dbg_old_index_check_init(struct ubifs_info *c,
+ struct ubifs_zbranch *zroot) { return 0; }
+static inline int dbg_check_old_index(struct ubifs_info *c,
+ struct ubifs_zbranch *zroot) { return 0; }
+static inline int dbg_check_cats(struct ubifs_info *c) { return 0; }
+static inline int dbg_check_ltab(struct ubifs_info *c) { return 0; }
+static inline int dbg_chk_lpt_free_spc(struct ubifs_info *c) { return 0; }
+static inline int dbg_chk_lpt_sz(struct ubifs_info *c,
+ int action, int len) { return 0; }
+static inline int dbg_check_synced_i_size(struct inode *inode) { return 0; }
+static inline int dbg_check_dir_size(struct ubifs_info *c,
+ const struct inode *dir) { return 0; }
+static inline int dbg_check_tnc(struct ubifs_info *c, int extra) { return 0; }
+static inline int dbg_check_idx_size(struct ubifs_info *c,
+ long long idx_size) { return 0; }
+static inline int dbg_check_filesystem(struct ubifs_info *c) { return 0; }
+static inline void dbg_check_heap(struct ubifs_info *c,
+ struct ubifs_lpt_heap *heap, int cat, int add_pos) {}
+static inline int dbg_check_lpt_nodes(struct ubifs_info *c,
+ struct ubifs_cnode *cnode, int row, int col) { return 0; }
+static inline int dbg_check_inode_size(struct ubifs_info *c,
+ const struct inode *inode, loff_t size) { return 0; }
+static inline int dbg_check_data_nodes_order(struct ubifs_info *c,
+ struct list_head *head) { return 0; }
+static inline int dbg_check_nondata_nodes_order(struct ubifs_info *c,
+ struct list_head *head) { return 0; }
+
+#define dbg_force_in_the_gaps_enabled 0
+static inline int dbg_force_in_the_gaps(void) { return 0; }
+#define dbg_failure_mode 0
+
+static inline int dbg_debugfs_init(void) { return 0; }
+static inline void dbg_debugfs_exit(void) {}
+static inline int dbg_debugfs_init_fs(struct ubifs_info *c) { return 0; }
+static inline int dbg_debugfs_exit_fs(struct ubifs_info *c) { return 0; }
#endif /* !CONFIG_UBIFS_FS_DEBUG */
#endif /* !__UBIFS_DEBUG_H__ */
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2] Fix gcc-4.5.2 "statement with no effect" warnings in UBIFS
2011-04-12 22:14 [PATCH v2] Fix gcc-4.5.2 "statement with no effect" warnings in UBIFS maksim.rayskiy
@ 2011-04-12 22:42 ` Mike Frysinger
2011-04-13 8:26 ` Artem Bityutskiy
1 sibling, 0 replies; 9+ messages in thread
From: Mike Frysinger @ 2011-04-12 22:42 UTC (permalink / raw)
To: maksim.rayskiy; +Cc: linux-mtd, dedekind1
On Tue, Apr 12, 2011 at 18:14, <maksim.rayskiy@gmail.com> wrote:
> From: Maksim Rayskiy <maksim.rayskiy@gmail.com>
>
> 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, replace #defines with dummy inline functions.
thanks for doing this !
Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] Fix gcc-4.5.2 "statement with no effect" warnings in UBIFS
2011-04-12 22:14 [PATCH v2] Fix gcc-4.5.2 "statement with no effect" warnings in UBIFS maksim.rayskiy
2011-04-12 22:42 ` Mike Frysinger
@ 2011-04-13 8:26 ` Artem Bityutskiy
2011-04-13 8:29 ` Artem Bityutskiy
1 sibling, 1 reply; 9+ messages in thread
From: Artem Bityutskiy @ 2011-04-13 8:26 UTC (permalink / raw)
To: maksim.rayskiy; +Cc: linux-mtd, vapier.adi
On Tue, 2011-04-12 at 15:14 -0700, maksim.rayskiy@gmail.com wrote:
> From: Maksim Rayskiy <maksim.rayskiy@gmail.com>
>
> 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, replace #defines with dummy inline functions.
>
> Signed-off-by: Maksim Rayskiy <maksim.rayskiy@gmail.com>
This patch does not compile and does not apply to the current tree. I'll
need to do a lot of massage as well because I dislike the "tabs as
dynamic spaces" style which you use, and the whole UBIFS code does not
use this approach, so I would like to maintain consistency.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] Fix gcc-4.5.2 "statement with no effect" warnings in UBIFS
2011-04-13 8:26 ` Artem Bityutskiy
@ 2011-04-13 8:29 ` Artem Bityutskiy
2011-04-13 8:49 ` Maksim Rayskiy
0 siblings, 1 reply; 9+ messages in thread
From: Artem Bityutskiy @ 2011-04-13 8:29 UTC (permalink / raw)
To: maksim.rayskiy; +Cc: linux-mtd, vapier.adi
On Wed, 2011-04-13 at 11:26 +0300, Artem Bityutskiy wrote:
> On Tue, 2011-04-12 at 15:14 -0700, maksim.rayskiy@gmail.com wrote:
> > From: Maksim Rayskiy <maksim.rayskiy@gmail.com>
> >
> > 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, replace #defines with dummy inline functions.
> >
> > Signed-off-by: Maksim Rayskiy <maksim.rayskiy@gmail.com>
>
> This patch does not compile and does not apply to the current tree. I'll
> need to do a lot of massage as well because I dislike the "tabs as
> dynamic spaces" style which you use, and the whole UBIFS code does not
> use this approach, so I would like to maintain consistency.
Sorry, it does compile with older UBIFS, but not with the current one.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] Fix gcc-4.5.2 "statement with no effect" warnings in UBIFS
2011-04-13 8:29 ` Artem Bityutskiy
@ 2011-04-13 8:49 ` Maksim Rayskiy
2011-04-13 8:52 ` Artem Bityutskiy
2011-04-13 9:18 ` Artem Bityutskiy
0 siblings, 2 replies; 9+ messages in thread
From: Maksim Rayskiy @ 2011-04-13 8:49 UTC (permalink / raw)
To: dedekind1; +Cc: linux-mtd, vapier.adi
Artem,
>> This patch does not compile and does not apply to the current tree. I'll
>> need to do a lot of massage as well because I dislike the "tabs as
>> dynamic spaces" style which you use, and the whole UBIFS code does not
>> use this approach, so I would like to maintain consistency.
>
> Sorry, it does compile with older UBIFS, but not with the current one.
>
>
I checked it against Linus tree. What tree you want me to use?
I am not clear what you want me to do with formatting.
Thanks,
Maksim.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] Fix gcc-4.5.2 "statement with no effect" warnings in UBIFS
2011-04-13 8:49 ` Maksim Rayskiy
@ 2011-04-13 8:52 ` Artem Bityutskiy
2011-04-13 9:18 ` Artem Bityutskiy
1 sibling, 0 replies; 9+ messages in thread
From: Artem Bityutskiy @ 2011-04-13 8:52 UTC (permalink / raw)
To: Maksim Rayskiy; +Cc: linux-mtd, vapier.adi
On Wed, 2011-04-13 at 01:49 -0700, Maksim Rayskiy wrote:
> Artem,
>
> >> This patch does not compile and does not apply to the current tree. I'll
> >> need to do a lot of massage as well because I dislike the "tabs as
> >> dynamic spaces" style which you use, and the whole UBIFS code does not
> >> use this approach, so I would like to maintain consistency.
> >
> > Sorry, it does compile with older UBIFS, but not with the current one.
> >
> >
>
> I checked it against Linus tree. What tree you want me to use?
I was talking about the ubifs-2.6.git tree.
> I am not clear what you want me to do with formatting.
I was talking about tabs as "dynamic" spaces, like:
static inline int func(int a)\t\t{ return 0; }
IMHO they are ugly, but this is personal opinion, I know many people use
them. But since whole UBIFS code-base does not use them, I do not want
to add them. Anyway, I've tweaked your patch a bit and pushed to the
ubifs-2.6.git tree. Here is it:
From: Maksim Rayskiy <maksim.rayskiy@gmail.com>
Subject: [PATCH] UBIFS: fix compilation warnings when compiling with gcc 4.5
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, replace #defines with dummy inline functions.
Artem: massage the patch a bit, also remove the duplicate
'dbg_check_lprops()' prototype.
Signed-off-by: Maksim Rayskiy <maksim.rayskiy@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
fs/ubifs/debug.h | 152 +++++++++++++++++++++++++++++++++---------------------
1 files changed, 94 insertions(+), 58 deletions(-)
diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h
index 919f0de..e6493ca 100644
--- a/fs/ubifs/debug.h
+++ b/fs/ubifs/debug.h
@@ -23,6 +23,12 @@
#ifndef __UBIFS_DEBUG_H__
#define __UBIFS_DEBUG_H__
+/* Checking helper functions */
+typedef int (*dbg_leaf_callback)(struct ubifs_info *c,
+ struct ubifs_zbranch *zbr, void *priv);
+typedef int (*dbg_znode_callback)(struct ubifs_info *c,
+ struct ubifs_znode *znode, void *priv);
+
#ifdef CONFIG_UBIFS_FS_DEBUG
/**
@@ -270,11 +276,6 @@ void dbg_dump_tnc(struct ubifs_info *c);
void dbg_dump_index(struct ubifs_info *c);
void dbg_dump_lpt_lebs(const struct ubifs_info *c);
-/* Checking helper functions */
-typedef int (*dbg_leaf_callback)(struct ubifs_info *c,
- struct ubifs_zbranch *zbr, void *priv);
-typedef int (*dbg_znode_callback)(struct ubifs_info *c,
- struct ubifs_znode *znode, void *priv);
int dbg_walk_index(struct ubifs_info *c, dbg_leaf_callback leaf_cb,
dbg_znode_callback znode_cb, void *priv);
@@ -295,7 +296,6 @@ int dbg_check_idx_size(struct ubifs_info *c, long long idx_size);
int dbg_check_filesystem(struct ubifs_info *c);
void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
int add_pos);
-int dbg_check_lprops(struct ubifs_info *c);
int dbg_check_lpt_nodes(struct ubifs_info *c, struct ubifs_cnode *cnode,
int row, int col);
int dbg_check_inode_size(struct ubifs_info *c, const struct inode *inode,
@@ -401,58 +401,94 @@ void dbg_debugfs_exit_fs(struct ubifs_info *c);
#define DBGKEY(key) ((char *)(key))
#define DBGKEY1(key) ((char *)(key))
-#define ubifs_debugging_init(c) 0
-#define ubifs_debugging_exit(c) ({})
-
-#define dbg_ntype(type) ""
-#define dbg_cstate(cmt_state) ""
-#define dbg_jhead(jhead) ""
-#define dbg_get_key_dump(c, key) ({})
-#define dbg_dump_inode(c, inode) ({})
-#define dbg_dump_node(c, node) ({})
-#define dbg_dump_lpt_node(c, node, lnum, offs) ({})
-#define dbg_dump_budget_req(req) ({})
-#define dbg_dump_lstats(lst) ({})
-#define dbg_dump_budg(c) ({})
-#define dbg_dump_lprop(c, lp) ({})
-#define dbg_dump_lprops(c) ({})
-#define dbg_dump_lpt_info(c) ({})
-#define dbg_dump_leb(c, lnum) ({})
-#define dbg_dump_znode(c, znode) ({})
-#define dbg_dump_heap(c, heap, cat) ({})
-#define dbg_dump_pnode(c, pnode, parent, iip) ({})
-#define dbg_dump_tnc(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_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_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_debugfs_exit()
-#define dbg_debugfs_init_fs(c) 0
-#define dbg_debugfs_exit_fs(c) 0
+static inline int ubifs_debugging_init(struct ubifs_info *c) { return 0; }
+static inline void ubifs_debugging_exit(struct ubifs_info *c) { return; }
+static inline const char *dbg_ntype(int type) { return ""; }
+static inline const char *dbg_cstate(int cmt_state) { return ""; }
+static inline const char *dbg_jhead(int jhead) { return ""; }
+static inline const char *
+dbg_get_key_dump(const struct ubifs_info *c,
+ const union ubifs_key *key) { return ""; }
+static inline void dbg_dump_inode(const struct ubifs_info *c,
+ const struct inode *inode) { return; }
+static inline void dbg_dump_node(const struct ubifs_info *c,
+ const void *node) { return; }
+static inline void dbg_dump_lpt_node(const struct ubifs_info *c,
+ void *node, int lnum,
+ int offs) { return; }
+static inline void
+dbg_dump_budget_req(const struct ubifs_budget_req *req) { return; }
+static inline void
+dbg_dump_lstats(const struct ubifs_lp_stats *lst) { return; }
+static inline void dbg_dump_budg(struct ubifs_info *c) { return; }
+static inline void dbg_dump_lprop(const struct ubifs_info *c,
+ const struct ubifs_lprops *lp) { return; }
+static inline void dbg_dump_lprops(struct ubifs_info *c) { return; }
+static inline void dbg_dump_lpt_info(struct ubifs_info *c) { return; }
+static inline void dbg_dump_leb(const struct ubifs_info *c,
+ int lnum) { return; }
+static inline void
+dbg_dump_znode(const struct ubifs_info *c,
+ const struct ubifs_znode *znode) { return; }
+static inline void dbg_dump_heap(struct ubifs_info *c,
+ struct ubifs_lpt_heap *heap,
+ int cat) { return; }
+static inline void dbg_dump_pnode(struct ubifs_info *c,
+ struct ubifs_pnode *pnode,
+ struct ubifs_nnode *parent,
+ int iip) { return; }
+static inline void dbg_dump_tnc(struct ubifs_info *c) { return; }
+static inline void dbg_dump_index(struct ubifs_info *c) { return; }
+static inline void dbg_dump_lpt_lebs(const struct ubifs_info *c) { return; }
+
+static inline int dbg_walk_index(struct ubifs_info *c,
+ dbg_leaf_callback leaf_cb,
+ dbg_znode_callback znode_cb,
+ void *priv) { return 0; }
+static inline void dbg_save_space_info(struct ubifs_info *c) { return; }
+static inline int dbg_check_space_info(struct ubifs_info *c) { return 0; }
+static inline int dbg_check_lprops(struct ubifs_info *c) { return 0; }
+static inline int
+dbg_old_index_check_init(struct ubifs_info *c,
+ struct ubifs_zbranch *zroot) { return 0; }
+static inline int
+dbg_check_old_index(struct ubifs_info *c,
+ struct ubifs_zbranch *zroot) { return 0; }
+static inline int dbg_check_cats(struct ubifs_info *c) { return 0; }
+static inline int dbg_check_ltab(struct ubifs_info *c) { return 0; }
+static inline int dbg_chk_lpt_free_spc(struct ubifs_info *c) { return 0; }
+static inline int dbg_chk_lpt_sz(struct ubifs_info *c,
+ int action, int len) { return 0; }
+static inline int dbg_check_synced_i_size(struct inode *inode) { return 0; }
+static inline int dbg_check_dir_size(struct ubifs_info *c,
+ const struct inode *dir) { return 0; }
+static inline int dbg_check_tnc(struct ubifs_info *c, int extra) { return 0; }
+static inline int dbg_check_idx_size(struct ubifs_info *c,
+ long long idx_size) { return 0; }
+static inline int dbg_check_filesystem(struct ubifs_info *c) { return 0; }
+static inline void dbg_check_heap(struct ubifs_info *c,
+ struct ubifs_lpt_heap *heap,
+ int cat, int add_pos) { return; }
+static inline int dbg_check_lpt_nodes(struct ubifs_info *c,
+ struct ubifs_cnode *cnode, int row, int col) { return 0; }
+static inline int dbg_check_inode_size(struct ubifs_info *c,
+ const struct inode *inode,
+ loff_t size) { return 0; }
+static inline int
+dbg_check_data_nodes_order(struct ubifs_info *c,
+ struct list_head *head) { return 0; }
+static inline int
+dbg_check_nondata_nodes_order(struct ubifs_info *c,
+ struct list_head *head) { return 0; }
+
+static inline int dbg_force_in_the_gaps(void) { return 0; }
+#define dbg_force_in_the_gaps_enabled 0
+#define dbg_failure_mode 0
+
+static inline int dbg_debugfs_init(void) { return 0; }
+static inline void dbg_debugfs_exit(void) { return; }
+static inline int dbg_debugfs_init_fs(struct ubifs_info *c) { return 0; }
+static inline int dbg_debugfs_exit_fs(struct ubifs_info *c) { return 0; }
#endif /* !CONFIG_UBIFS_FS_DEBUG */
#endif /* !__UBIFS_DEBUG_H__ */
--
1.7.2.3
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2] Fix gcc-4.5.2 "statement with no effect" warnings in UBIFS
2011-04-13 8:49 ` Maksim Rayskiy
2011-04-13 8:52 ` Artem Bityutskiy
@ 2011-04-13 9:18 ` Artem Bityutskiy
2011-04-13 17:18 ` Maksim Rayskiy
1 sibling, 1 reply; 9+ messages in thread
From: Artem Bityutskiy @ 2011-04-13 9:18 UTC (permalink / raw)
To: Maksim Rayskiy; +Cc: linux-mtd, vapier.adi
On Wed, 2011-04-13 at 01:49 -0700, Maksim Rayskiy wrote:
> Artem,
>
> >> This patch does not compile and does not apply to the current tree. I'll
> >> need to do a lot of massage as well because I dislike the "tabs as
> >> dynamic spaces" style which you use, and the whole UBIFS code does not
> >> use this approach, so I would like to maintain consistency.
> >
> > Sorry, it does compile with older UBIFS, but not with the current one.
> >
> >
>
> I checked it against Linus tree. What tree you want me to use?
> I am not clear what you want me to do with formatting.
Maksim,
would you please confirm the patch I pushed to ubifs-2.6.git tree fixes
all the gcc-4.5 warnings?
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] Fix gcc-4.5.2 "statement with no effect" warnings in UBIFS
2011-04-13 9:18 ` Artem Bityutskiy
@ 2011-04-13 17:18 ` Maksim Rayskiy
2011-04-14 6:06 ` Artem Bityutskiy
0 siblings, 1 reply; 9+ messages in thread
From: Maksim Rayskiy @ 2011-04-13 17:18 UTC (permalink / raw)
To: dedekind1; +Cc: linux-mtd
Artem,
Yes, the compilation is clean now, no warnings.
Maksim.
On Wed, Apr 13, 2011 at 2:18 AM, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Wed, 2011-04-13 at 01:49 -0700, Maksim Rayskiy wrote:
>> Artem,
>>
>> >> This patch does not compile and does not apply to the current tree. I'll
>> >> need to do a lot of massage as well because I dislike the "tabs as
>> >> dynamic spaces" style which you use, and the whole UBIFS code does not
>> >> use this approach, so I would like to maintain consistency.
>> >
>> > Sorry, it does compile with older UBIFS, but not with the current one.
>> >
>> >
>>
>> I checked it against Linus tree. What tree you want me to use?
>> I am not clear what you want me to do with formatting.
>
> Maksim,
>
> would you please confirm the patch I pushed to ubifs-2.6.git tree fixes
> all the gcc-4.5 warnings?
>
> --
> Best Regards,
> Artem Bityutskiy (Артём Битюцкий)
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] Fix gcc-4.5.2 "statement with no effect" warnings in UBIFS
2011-04-13 17:18 ` Maksim Rayskiy
@ 2011-04-14 6:06 ` Artem Bityutskiy
0 siblings, 0 replies; 9+ messages in thread
From: Artem Bityutskiy @ 2011-04-14 6:06 UTC (permalink / raw)
To: Maksim Rayskiy; +Cc: linux-mtd
On Wed, 2011-04-13 at 10:18 -0700, Maksim Rayskiy wrote:
> Artem,
>
> Yes, the compilation is clean now, no warnings.
OK, thanks a lot!
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-04-14 6:09 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-12 22:14 [PATCH v2] Fix gcc-4.5.2 "statement with no effect" warnings in UBIFS maksim.rayskiy
2011-04-12 22:42 ` Mike Frysinger
2011-04-13 8:26 ` Artem Bityutskiy
2011-04-13 8:29 ` Artem Bityutskiy
2011-04-13 8:49 ` Maksim Rayskiy
2011-04-13 8:52 ` Artem Bityutskiy
2011-04-13 9:18 ` Artem Bityutskiy
2011-04-13 17:18 ` Maksim Rayskiy
2011-04-14 6:06 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).