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>
This commit is contained in:
1 parent
d5571fa1db
commit
df843a34a6
5 files changed
+45
-60
No files matched your search
@@ -106,13 +106,35 @@ struct packed_item {
|
||||
__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
|
||||
|
||||
@@ -16,36 +16,6 @@ reiserfs_bitmap_t *what_to_pack;
|
||||
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;
|
||||
|
||||
Reference in new issue
Block a user