reiserfsprogs: fix issues with inline functions

There are several cases in which inline functions are declared in
header files.  This causes warnings with newer versions of gcc.
This patch converts them to static inlines.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
diff --git a/debugreiserfs/debugreiserfs.h b/debugreiserfs/debugreiserfs.h
index 582ea5b..2c19290 100644
--- a/debugreiserfs/debugreiserfs.h
+++ b/debugreiserfs/debugreiserfs.h
@@ -106,13 +106,35 @@
 	__u32 type_2_mask_18_len_12;
 };
 
-/* defined as inlines in both pack.c and unpack.c */
-inline void set_pi_type(struct packed_item *pi, __u32 val);
-inline __u32 get_pi_type(const struct packed_item *pi);
-inline void set_pi_mask(struct packed_item *pi, __u32 val);
-inline __u32 get_pi_mask(const struct packed_item *pi);
-inline void set_pi_item_len(struct packed_item *pi, __u32 val);
-inline __u32 get_pi_item_len(const struct packed_item *pi);
+static inline void set_pi_type(struct packed_item *pi, __u32 val)
+{
+	set_bit_field_XX(32, pi, val, 0, 2);
+}
+
+static inline __u32 get_pi_type(const struct packed_item *pi)
+{
+	get_bit_field_XX(32, pi, 0, 2);
+}
+
+static inline void set_pi_mask(struct packed_item *pi, __u32 val)
+{
+	set_bit_field_XX(32, pi, val, 2, 18);
+}
+
+static inline __u32 get_pi_mask(const struct packed_item *pi)
+{
+	get_bit_field_XX(32, pi, 2, 18);
+}
+
+static inline void set_pi_item_len(struct packed_item *pi, __u32 val)
+{
+	set_bit_field_XX(32, pi, val, 20, 12);
+}
+
+static inline __u32 get_pi_item_len(const struct packed_item *pi)
+{
+	get_bit_field_XX(32, pi, 20, 12);
+}
 
 #define HAS_DIR_ID      0x01
 #define HAS_GEN_COUNTER 0x02
diff --git a/debugreiserfs/pack.c b/debugreiserfs/pack.c
index 1520bdf..02e1aca 100644
--- a/debugreiserfs/pack.c
+++ b/debugreiserfs/pack.c
@@ -16,36 +16,6 @@
 unsigned long sent_bytes;	/* how many bytes sent to stdout */
 unsigned long had_to_be_sent;	/* how many bytes were to be sent */
 
-inline void set_pi_type(struct packed_item *pi, __u32 val)
-{
-	set_bit_field_XX(32, pi, val, 0, 2);
-}
-
-inline __u32 get_pi_type(const struct packed_item *pi)
-{
-	get_bit_field_XX(32, pi, 0, 2);
-}
-
-inline void set_pi_mask(struct packed_item *pi, __u32 val)
-{
-	set_bit_field_XX(32, pi, val, 2, 18);
-}
-
-__u32 get_pi_mask(const struct packed_item *pi)
-{
-	get_bit_field_XX(32, pi, 2, 18);
-}
-
-inline void set_pi_item_len(struct packed_item *pi, __u32 val)
-{
-	set_bit_field_XX(32, pi, val, 20, 12);
-}
-
-inline __u32 get_pi_item_len(const struct packed_item *pi)
-{
-	get_bit_field_XX(32, pi, 20, 12);
-}
-
 static void pack_ih(struct packed_item *pi, struct item_head *ih)
 {
 	__u32 v32;
diff --git a/fsck/check_tree.c b/fsck/check_tree.c
index 5b6bddf..ffe7cdc 100644
--- a/fsck/check_tree.c
+++ b/fsck/check_tree.c
@@ -387,7 +387,7 @@
 	return 0;
 }
 
-inline void handle_one_pointer(reiserfs_filsys_t fs,
+static inline void handle_one_pointer(reiserfs_filsys_t fs,
 			       struct buffer_head *bh, __le32 * item,
 			       int offset)
 {
diff --git a/include/misc.h b/include/misc.h
index ad32c21..45fde6a 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -222,13 +222,22 @@
 	return res + (p - addr) * 8;
 }
 
-#define STAT_FIELD_H(Field, Type)	\
-inline Type misc_device_##Field(const char *device);
+#define STAT_FIELD(Field, Type)						\
+static inline Type misc_device_##Field(const char *device)		\
+{									\
+	struct stat st;							\
+									\
+	if (stat(device, &st) == 0)					\
+		return st.st_##Field;					\
+									\
+	fprintf(stderr, "Stat of the device '%s' failed.", device);	\
+	exit(8);							\
+}
 
-STAT_FIELD_H(mode, mode_t);
-STAT_FIELD_H(rdev, dev_t);
-STAT_FIELD_H(size, off_t);
-STAT_FIELD_H(blocks, blkcnt_t);
+STAT_FIELD(mode, mode_t);
+STAT_FIELD(rdev, dev_t);
+STAT_FIELD(size, off_t);
+STAT_FIELD(blocks, blkcnt_t);
 
 __u16 mask16(int from, int count);
 __u32 mask32(int from, int count);
diff --git a/lib/misc.c b/lib/misc.c
index dc9429b..090f5dd 100644
--- a/lib/misc.c
+++ b/lib/misc.c
@@ -27,22 +27,6 @@
 #include <sys/mount.h>
 /* End Debian mods */
 
-#define STAT_FIELD(Field, Type)						\
-inline Type misc_device_##Field(const char *device) {			\
-	struct stat st;							\
-									\
-	if (stat(device, &st) == 0)					\
-		return st.st_##Field;					\
-									\
-	fprintf(stderr, "Stat of the device '%s' failed.", device);	\
-	exit(8);							\
-}
-
-STAT_FIELD(mode, mode_t);
-STAT_FIELD(rdev, dev_t);
-STAT_FIELD(size, off_t);
-STAT_FIELD(blocks, blkcnt_t);
-
 void die(const char *fmt, ...)
 {
 	static char buf[1024];