mirror of
https://github.com/ceph/ceph
synced 2024-12-22 03:22:00 +00:00
libcephfs.h: fix unnecessary forward declarations
This is an issue in case non-cpp code. Move the declaration of inodeno_t and vinodeno_t structs into __cplusplus block where they are needed. Fix for cppcheck issue: [src/include/cephfs/libcephfs.h:89] -> [src/include/cephfs/libcephfs.h:74]: The struct 'inodeno_t' forward declaration is unnecessary. Type struct is already declared earlier. [src/include/cephfs/libcephfs.h:93] -> [src/include/cephfs/libcephfs.h:83]: The struct 'vinodeno_t' forward declaration is unnecessary. Type struct is already declared earlier. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
parent
4a1bdc72b9
commit
53c9dd4d2d
@ -76,7 +76,7 @@ struct ceph_file_layout {
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
typedef struct _inodeno_t {
|
||||
typedef struct inodeno_t {
|
||||
uint64_t val;
|
||||
} inodeno_t;
|
||||
|
||||
@ -90,15 +90,17 @@ typedef struct vinodeno_t {
|
||||
} vinodeno_t;
|
||||
|
||||
typedef struct Fh Fh;
|
||||
#else /* _cplusplus */
|
||||
|
||||
struct inodeno_t;
|
||||
struct vinodeno_t;
|
||||
typedef struct vinodeno_t vinodeno;
|
||||
|
||||
#endif /* ! __cplusplus */
|
||||
|
||||
struct inodeno_t;
|
||||
struct Inode;
|
||||
typedef struct Inode Inode;
|
||||
|
||||
struct vinodeno_t;
|
||||
typedef struct vinodeno_t vinodeno;
|
||||
struct ceph_mount_info;
|
||||
struct ceph_dir_result;
|
||||
struct CephContext;
|
||||
|
Loading…
Reference in New Issue
Block a user