multipath-tools: libdmmp: Fix incorrect use of __attribute__
PATCH 1/1 multipath-tools: libdmmp: Fix incorrect use of __attribute__
According to https://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html , type attributes should be placed immediately after the struct, union or enum keyword.
Signed-off-by Gris Ge <[email protected]>
--- libdmmp/libdmmp/libdmmp.h | 8 ++++---- libdmmp/libdmmp_private.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-)
libdmmp/libdmmp/libdmmp.h +4 -4
@@ -73,18 +73,18 @@ extern "C" {*/ DMMP_DLL_EXPORT const char *dmmp_log_priority_str(int priority); -DMMP_DLL_EXPORT struct dmmp_context; +struct DMMP_DLL_EXPORT dmmp_context; -DMMP_DLL_EXPORT struct dmmp_mpath; +struct DMMP_DLL_EXPORT dmmp_mpath; -DMMP_DLL_EXPORT struct dmmp_path_group; +struct DMMP_DLL_EXPORT dmmp_path_group;#define DMMP_PATH_GROUP_STATUS_UNKNOWN 0#define DMMP_PATH_GROUP_STATUS_ENABLED 1#define DMMP_PATH_GROUP_STATUS_DISABLED 2#define DMMP_PATH_GROUP_STATUS_ACTIVE 3 -DMMP_DLL_EXPORT struct dmmp_path; +struct DMMP_DLL_EXPORT dmmp_path;#define DMMP_PATH_STATUS_UNKNOWN 0//#define DMMP_PATH_STATUS_UNCHECKED 1
libdmmp/libdmmp_private.h +2 -1
@@ -47,7 +47,8 @@ extern "C" {#define _DMMP_PATH_GROUP_ID_UNKNOWN 0 -DMMP_DLL_LOCAL struct _num_str_conv { +struct DMMP_DLL_LOCAL _num_str_conv; +struct _num_str_conv {const uint32_t value;const char *str; };
Signature · 1 line
2.12.0
Christophe Varoqui
AppliedApplied
Thanks.
Quoted 59 lines · Gris Ge
According to https://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html , type attributes should be placed immediately after the struct, union or enum keyword.
Signed-off-by Gris Ge <[email protected]>--- libdmmp/libdmmp/libdmmp.h | 8 ++++---- libdmmp/libdmmp_private.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-)libdmmp/libdmmp/libdmmp.h +4
-4@@ -73,18 +73,18 @@ extern "C" {*/ DMMP_DLL_EXPORT const char *dmmp_log_priority_str(int priority); -DMMP_DLL_EXPORT struct dmmp_context; +struct DMMP_DLL_EXPORT dmmp_context; -DMMP_DLL_EXPORT struct dmmp_mpath; +struct DMMP_DLL_EXPORT dmmp_mpath; -DMMP_DLL_EXPORT struct dmmp_path_group; +struct DMMP_DLL_EXPORT dmmp_path_group;#define DMMP_PATH_GROUP_STATUS_UNKNOWN 0#define DMMP_PATH_GROUP_STATUS_ENABLED 1#define DMMP_PATH_GROUP_STATUS_DISABLED 2#define DMMP_PATH_GROUP_STATUS_ACTIVE 3 -DMMP_DLL_EXPORT struct dmmp_path; +struct DMMP_DLL_EXPORT dmmp_path;#define DMMP_PATH_STATUS_UNKNOWN 0//#define DMMP_PATH_STATUS_UNCHECKED 1 libdmmp/libdmmp_private.h +2
-2@@ -47,7 +47,8 @@ extern "C" {#define _DMMP_PATH_GROUP_ID_UNKNOWN 0 -DMMP_DLL_LOCAL struct _num_str_conv { +struct DMMP_DLL_LOCAL _num_str_conv; +struct _num_str_conv {const uint32_t value;const char *str; }; --2.12.0
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel