diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-11-25 16:37:42 +0000 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-11-25 17:05:51 +0000 |
commit | 63641083f05e59e3dbe0d83c347c3f977317d9cf (patch) | |
tree | f63df35ffff41c28cd1b26d2bac2e8e1e42ab9be /telepathy-glib/connection-manager.h | |
parent | 720a212aee81ad6612ec19fcede86a1ec791f046 (diff) | |
download | telepathy-glib-63641083f05e59e3dbe0d83c347c3f977317d9cf.tar.gz |
Don't rely on enum types being unsigned
Not all compilers use unsigned types for enums even if all the values are
postive, as such an enum with 3 items doesn't always fit in a 2 bit field.
This can cause interesting bugs.
Force the type to be an unsigned int, this hopefully doesn't break
anything and fixes the bug without breaking ABI etc.
Reviewed-By: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'telepathy-glib/connection-manager.h')
-rw-r--r-- | telepathy-glib/connection-manager.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/telepathy-glib/connection-manager.h b/telepathy-glib/connection-manager.h index d8a97fa18..c9574a00e 100644 --- a/telepathy-glib/connection-manager.h +++ b/telepathy-glib/connection-manager.h @@ -90,7 +90,8 @@ struct _TpConnectionManager { /* These are really booleans, but gboolean is signed. Thanks, GLib */ unsigned int running:1; unsigned int always_introspect:1; - TpCMInfoSource info_source:2; + /* TpCMInfoSource, but can't rely on enums being unsigned */ + unsigned int info_source:2; guint reserved_flags:28; TpConnectionManagerPrivate *priv; |