Hi Grant,

> Move enumeration type defintions AFTER the enumerations themselves are 
> declared 
> and defined such that the header works with strict compilers.
> ---
> gdbus/gdbus.h | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
> index d99c254..7a6a18f 100644
> --- a/gdbus/gdbus.h
> +++ b/gdbus/gdbus.h
> @@ -31,10 +31,6 @@ extern "C" {
> #include <dbus/dbus.h>
> #include <glib.h>
> 
> -typedef enum GDBusMethodFlags GDBusMethodFlags;
> -typedef enum GDBusSignalFlags GDBusSignalFlags;
> -typedef enum GDBusPropertyFlags GDBusPropertyFlags;
> -typedef enum GDBusSecurityFlags GDBusSecurityFlags;
> 
> typedef struct GDBusArgInfo GDBusArgInfo;
> typedef struct GDBusMethodTable GDBusMethodTable;
> @@ -115,6 +111,11 @@ enum GDBusSecurityFlags {
>       G_DBUS_SECURITY_FLAG_ALLOW_INTERACTION = (1 << 2),
> };
> 
> +typedef enum GDBusMethodFlags GDBusMethodFlags;
> +typedef enum GDBusSignalFlags GDBusSignalFlags;
> +typedef enum GDBusPropertyFlags GDBusPropertyFlags;
> +typedef enum GDBusSecurityFlags GDBusSecurityFlags;
> +

which compiler is this? This code has been in there for a long time and in 
multiple projects. I have not seen any problems with it.

Regards

Marcel

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to