[dm-devel] [PATCH] multipath-tools: libdmmp: Fix incorrect use of __attribute__

Christophe Varoqui christophe.varoqui at opensvc.com
Thu Mar 16 06:45:57 UTC 2017


Applied
Thanks.

On Sat, Mar 11, 2017 at 3:12 PM, Gris Ge <fge at redhat.com> wrote:

> 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 <fge at redhat.com>
> ---
>  libdmmp/libdmmp/libdmmp.h | 8 ++++----
>  libdmmp/libdmmp_private.h | 3 ++-
>  2 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/libdmmp/libdmmp/libdmmp.h b/libdmmp/libdmmp/libdmmp.h
> index 3fc8e6f..0679158 100644
> --- a/libdmmp/libdmmp/libdmmp.h
> +++ b/libdmmp/libdmmp/libdmmp.h
> @@ -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
> diff --git a/libdmmp/libdmmp_private.h b/libdmmp/libdmmp_private.h
> index e23c995..3e813cb 100644
> --- a/libdmmp/libdmmp_private.h
> +++ b/libdmmp/libdmmp_private.h
> @@ -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
> dm-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20170316/bf9bf1fb/attachment.htm>


More information about the dm-devel mailing list