Commit 74b81da2 authored by Pekka Pessi's avatar Pekka Pessi

nua: removed warnings from SR_INIT() and nhp_set handling.

darcs-hash:20061206161407-65a35-2621fb99ecb5fd509bd10387326c318c75d04234.gz
parent e78bd71d
......@@ -87,8 +87,10 @@ struct nua_server_request {
unsigned sr_answer_recv:1; /**< We have received SDP answer */
};
#define SR_INIT(sr) \
(memset((sr), 0, sizeof (sr)[0]), SR_STATUS1((sr), SIP_100_TRYING), sr)
#define SR_INIT(sr) \
((void)memset((sr), 0, sizeof (sr)[0]), \
(void)(SR_STATUS1((sr), SIP_100_TRYING)), \
sr)
#define SR_STATUS(sr, status, phrase) \
((sr)->sr_phrase = (phrase), (sr)->sr_status = (status))
......
......@@ -77,8 +77,8 @@ su_inline int nhp_is_any_set(nua_handle_preferences_t const *nhp)
su_inline void nhp_or_set(nua_handle_preferences_t *a,
nua_handle_preferences_t const *b)
{
unsigned *ap = (unsigned *)&a->nhp_set;
unsigned const *bp = (unsigned const *)&b->nhp_set;
unsigned *ap = a->nhp_set_.set_unsigned;
unsigned const *bp = b->nhp_set_.set_unsigned;
size_t i;
memcpy(a, b, offsetof(nua_handle_preferences_t, nhp_set));
......
......@@ -128,8 +128,8 @@ typedef struct nua_handle_preferences
/**< Network detection: NONE, INFORMAL, TRY_FULL */
int nhp_detect_network_updates;
/* A bit for each feature set by application */
struct {
union { struct {
/* A bit for each feature set by application */
unsigned nhb_retry_count:1;
unsigned nhb_max_subscriptions:1;
......@@ -177,9 +177,13 @@ typedef struct nua_handle_preferences
unsigned nhb_outbound:1;
unsigned nhb_detect_network_updates:1;
unsigned :0;
} nhp_set;
} set_bits;
unsigned set_unsigned[2];
} nhp_set_;
} nua_handle_preferences_t;
#define nhp_set nhp_set_.set_bits
#define DNHP_GET(dnhp, pref) ((dnhp)->nhp_##pref)
#define NHP_GET(nhp, dnhp, pref) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment