diff --git a/daemon/codec.c b/daemon/codec.c index a91ad25ba..225c40026 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -130,15 +130,15 @@ struct codec_ssrc_handler { uint64_t skip_pts; - int rtp_mark:1; + unsigned int rtp_mark:1; }; struct transcode_packet { seq_packet_t p; // must be first unsigned long ts; str *payload; struct codec_handler *handler; - int marker:1, - ignore_seq:1; + unsigned int marker:1, + ignore_seq:1; int (*func)(struct codec_ssrc_handler *, struct transcode_packet *, struct media_packet *); int (*dup_func)(struct codec_ssrc_handler *, struct transcode_packet *, struct media_packet *); struct rtp_header rtp; diff --git a/daemon/poller.c b/daemon/poller.c index 20478d3c7..535b8a1eb 100644 --- a/daemon/poller.c +++ b/daemon/poller.c @@ -33,8 +33,8 @@ struct poller_item_int { struct obj obj; struct poller_item item; - int blocked:1; - int error:1; + unsigned int blocked:1; + unsigned int error:1; }; struct poller { diff --git a/daemon/rtcp.c b/daemon/rtcp.c index 538a8a1b1..8580341c2 100644 --- a/daemon/rtcp.c +++ b/daemon/rtcp.c @@ -249,7 +249,7 @@ struct rtcp_process_ctx { int json_init_len; // verdict - int discard:1; + unsigned int discard:1; }; // all available methods struct rtcp_handler { diff --git a/daemon/sdp.c b/daemon/sdp.c index 5995bfebf..e8c165c2f 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -33,13 +33,13 @@ struct sdp_origin { struct network_address address; unsigned long long version_num; size_t version_output_pos; - int parsed:1; + unsigned int parsed:1; }; struct sdp_connection { str s; struct network_address address; - int parsed:1; + unsigned int parsed:1; }; struct sdp_attributes { @@ -97,7 +97,7 @@ struct attribute_candidate { str related_port_str; struct ice_candidate cand_parsed; - int parsed:1; + unsigned int parsed:1; }; struct attribute_crypto { @@ -118,9 +118,9 @@ struct attribute_crypto { u_int64_t lifetime; unsigned char mki[256]; unsigned int mki_len; - int unencrypted_srtcp:1, - unencrypted_srtp:1, - unauthenticated_srtp:1; + unsigned int unencrypted_srtcp:1, + unencrypted_srtp:1, + unauthenticated_srtp:1; }; struct attribute_ssrc { diff --git a/include/bencode.h b/include/bencode.h index e729c9b70..e271371cc 100644 --- a/include/bencode.h +++ b/include/bencode.h @@ -41,7 +41,7 @@ struct bencode_item { struct bencode_buffer { struct __bencode_buffer_piece *pieces; struct __bencode_free_list *free_list; - int error:1; /* set to !0 if allocation failed at any point */ + unsigned int error:1; /* set to !0 if allocation failed at any point */ }; diff --git a/include/call.h b/include/call.h index 7745e1c0e..8a2e24ca6 100644 --- a/include/call.h +++ b/include/call.h @@ -234,7 +234,7 @@ struct endpoint_map { unsigned int num_ports; const struct logical_intf *logical_intf; GQueue intf_sfds; /* list of struct intf_list - contains stream_fd list */ - int wildcard:1; + unsigned int wildcard:1; }; struct loop_protector { @@ -375,9 +375,9 @@ struct call_monologue { unsigned long long sdp_version; GString *last_sdp; - int block_dtmf:1; - int block_media:1; - int rec_forwarding:1; + unsigned int block_dtmf:1; + unsigned int block_media:1; + unsigned int rec_forwarding:1; }; struct call { @@ -414,13 +414,13 @@ struct call { struct recording *recording; str metadata; - int block_dtmf:1; - int block_media:1; - int recording_on:1; - int rec_forwarding:1; - int drop_traffic:1; - int foreign_call:1; // created_via_redis_notify call - int disable_jb:1; + unsigned int block_dtmf:1; + unsigned int block_media:1; + unsigned int recording_on:1; + unsigned int rec_forwarding:1; + unsigned int drop_traffic:1; + unsigned int foreign_call:1; // created_via_redis_notify call + unsigned int disable_jb:1; }; diff --git a/include/call_interfaces.h b/include/call_interfaces.h index c6c4c1b9c..3b43908f1 100644 --- a/include/call_interfaces.h +++ b/include/call_interfaces.h @@ -63,70 +63,70 @@ struct sdp_ng_flags { ICE_LITE_BKW, ICE_LITE_BOTH, } ice_lite_option:2; - int asymmetric:1, - protocol_accept:1, - no_redis_update:1, - unidirectional:1, - trust_address:1, - port_latching:1, - no_port_latching:1, - replace_origin:1, - replace_sess_conn:1, - replace_sdp_version:1, - replace_zero_address:1, - rtcp_mux_offer:1, - rtcp_mux_require:1, - rtcp_mux_demux:1, - rtcp_mux_accept:1, - rtcp_mux_reject:1, - no_rtcp_attr:1, - full_rtcp_attr:1, - generate_rtcp:1, - generate_rtcp_off:1, - generate_mid:1, - strict_source:1, - media_handover:1, - dtls_passive:1, - dtls_reverse_passive:1, - osrtp_accept:1, - osrtp_offer:1, - reset:1, - all:1, - fragment:1, - record_call:1, - loop_protect:1, - original_sendrecv:1, - asymmetric_codecs:1, - symmetric_codecs:1, - reorder_codecs:1, - single_codec:1, - inject_dtmf:1, - t38_decode:1, - t38_force:1, - t38_stop:1, - t38_no_ecm:1, - t38_no_v17:1, - t38_no_v27ter:1, - t38_no_v29:1, - t38_no_v34:1, - t38_no_iaf:1, - t38_fec:1, - supports_load_limit:1, - dtls_off:1, - sdes_off:1, - sdes_unencrypted_srtp:1, - sdes_unencrypted_srtcp:1, - sdes_unauthenticated_srtp:1, - sdes_encrypted_srtp:1, - sdes_encrypted_srtcp:1, - sdes_authenticated_srtp:1, - sdes_lifetime:1, - sdes_pad:1, - drop_traffic_start:1, - drop_traffic_stop:1, - passthrough_on:1, - passthrough_off:1, - disable_jb:1; + unsigned int asymmetric:1, + protocol_accept:1, + no_redis_update:1, + unidirectional:1, + trust_address:1, + port_latching:1, + no_port_latching:1, + replace_origin:1, + replace_sess_conn:1, + replace_sdp_version:1, + replace_zero_address:1, + rtcp_mux_offer:1, + rtcp_mux_require:1, + rtcp_mux_demux:1, + rtcp_mux_accept:1, + rtcp_mux_reject:1, + no_rtcp_attr:1, + full_rtcp_attr:1, + generate_rtcp:1, + generate_rtcp_off:1, + generate_mid:1, + strict_source:1, + media_handover:1, + dtls_passive:1, + dtls_reverse_passive:1, + osrtp_accept:1, + osrtp_offer:1, + reset:1, + all:1, + fragment:1, + record_call:1, + loop_protect:1, + original_sendrecv:1, + asymmetric_codecs:1, + symmetric_codecs:1, + reorder_codecs:1, + single_codec:1, + inject_dtmf:1, + t38_decode:1, + t38_force:1, + t38_stop:1, + t38_no_ecm:1, + t38_no_v17:1, + t38_no_v27ter:1, + t38_no_v29:1, + t38_no_v34:1, + t38_no_iaf:1, + t38_fec:1, + supports_load_limit:1, + dtls_off:1, + sdes_off:1, + sdes_unencrypted_srtp:1, + sdes_unencrypted_srtcp:1, + sdes_unauthenticated_srtp:1, + sdes_encrypted_srtp:1, + sdes_encrypted_srtcp:1, + sdes_authenticated_srtp:1, + sdes_lifetime:1, + sdes_pad:1, + drop_traffic_start:1, + drop_traffic_stop:1, + passthrough_on:1, + passthrough_off:1, + disable_jb:1; }; diff --git a/include/codec.h b/include/codec.h index a4ab10567..664e53ac8 100644 --- a/include/codec.h +++ b/include/codec.h @@ -31,10 +31,10 @@ struct codec_handler { int dtmf_payload_type; int cn_payload_type; codec_handler_func *func; - int kernelize:1; - int transcoder:1; - int dtmf_scaler:1; - int pcm_dtmf_detect:1; + unsigned int kernelize:1; + unsigned int transcoder:1; + unsigned int dtmf_scaler:1; + unsigned int pcm_dtmf_detect:1; struct ssrc_hash *ssrc_hash; struct codec_handler *output_handler; // == self, or other PT handler diff --git a/include/crypto.h b/include/crypto.h index 5af7d687e..7842de535 100644 --- a/include/crypto.h +++ b/include/crypto.h @@ -63,9 +63,9 @@ struct crypto_suite { }; struct crypto_session_params { - int unencrypted_srtcp:1, - unencrypted_srtp:1, - unauthenticated_srtp:1; + unsigned int unencrypted_srtcp:1, + unencrypted_srtp:1, + unauthenticated_srtp:1; }; struct crypto_params { @@ -95,7 +95,7 @@ struct crypto_context { void *session_key_ctx[2]; - int have_session_key:1; + unsigned int have_session_key:1; }; diff --git a/include/dtls.h b/include/dtls.h index ebb192362..04c751460 100644 --- a/include/dtls.h +++ b/include/dtls.h @@ -53,9 +53,9 @@ struct dtls_connection { SSL *ssl; BIO *r_bio, *w_bio; void *ptr; - int init:1, - active:1, - connected:1; + unsigned int init:1, + active:1, + connected:1; }; diff --git a/include/ice.h b/include/ice.h index 7ca2b1495..108daa7cb 100644 --- a/include/ice.h +++ b/include/ice.h @@ -99,7 +99,7 @@ struct ice_candidate_pair { unsigned int retransmits; struct ice_agent *agent; u_int64_t pair_priority; - int was_controlling:1, + unsigned int was_controlling:1, was_nominated:1; }; diff --git a/include/media_socket.h b/include/media_socket.h index f5d8311d0..f39559c5c 100644 --- a/include/media_socket.h +++ b/include/media_socket.h @@ -44,11 +44,11 @@ struct transport_protocol { const char *name; enum transport_protocol_index avpf_proto; enum transport_protocol_index osrtp_proto; - int rtp:1; /* also set to 1 for SRTP */ - int srtp:1; - int osrtp:1; - int avpf:1; - int tcp:1; + unsigned int rtp:1; /* also set to 1 for SRTP */ + unsigned int srtp:1; + unsigned int osrtp:1; + unsigned int avpf:1; + unsigned int tcp:1; }; extern const struct transport_protocol transport_protocols[]; diff --git a/include/stun.h b/include/stun.h index 08488a08b..f80a3aab9 100644 --- a/include/stun.h +++ b/include/stun.h @@ -25,9 +25,9 @@ struct stun_attrs { u_int64_t tiebreaker; endpoint_t mapped; unsigned int error_code; - int use:1, - controlled:1, - controlling:1; + unsigned int use:1, + controlled:1, + controlling:1; }; diff --git a/include/t38.h b/include/t38.h index d95716862..3eb9a0625 100644 --- a/include/t38.h +++ b/include/t38.h @@ -12,17 +12,17 @@ struct t38_options { int max_ifp; int max_datagram; - int local_tcf:1; - int fill_bit_removal:1; - int transcoding_mmr:1; - int transcoding_jbig:1; - - int no_ecm:1; - int no_v17:1; - int no_v27ter:1; - int no_v29:1; - int no_v34:1; - int no_iaf:1; + unsigned int local_tcf:1; + unsigned int fill_bit_removal:1; + unsigned int transcoding_mmr:1; + unsigned int transcoding_jbig:1; + + unsigned int no_ecm:1; + unsigned int no_v17:1; + unsigned int no_v27ter:1; + unsigned int no_v29:1; + unsigned int no_v34:1; + unsigned int no_iaf:1; }; diff --git a/kernel-module/xt_RTPENGINE.h b/kernel-module/xt_RTPENGINE.h index 82b6f8612..107a413dc 100644 --- a/kernel-module/xt_RTPENGINE.h +++ b/kernel-module/xt_RTPENGINE.h @@ -112,7 +112,7 @@ struct rtpengine_target_info { unsigned int num_payload_types; unsigned char tos; - int rtcp_mux:1, + unsigned int rtcp_mux:1, dtls:1, stun:1, rtp:1, diff --git a/lib/codeclib.h b/lib/codeclib.h index cda735ce9..3d081467b 100644 --- a/lib/codeclib.h +++ b/lib/codeclib.h @@ -103,10 +103,10 @@ union codec_options_u { unsigned int mode_set; // bitfield int mode_change_period; int mode_change_interval; - int octet_aligned:1; - int crc:1; - int robust_sorting:1; - int mode_change_neighbor:1; + unsigned int octet_aligned:1; + unsigned int crc:1; + unsigned int robust_sorting:1; + unsigned int mode_change_neighbor:1; const unsigned int *bits_per_frame; const unsigned int *bitrates; @@ -142,12 +142,12 @@ struct codec_def_s { // filled in by codeclib_init() str rtpname_str; int rfc_payload_type; - int support_encoding:1, - support_decoding:1; + unsigned int support_encoding:1, + support_decoding:1; // flags - int supplemental:1, - dtmf:1; // special case + unsigned int supplemental:1, + dtmf:1; // special case const codec_type_t *codec_type; diff --git a/lib/rtplib.h b/lib/rtplib.h index f29b11ce0..ad28fbde5 100644 --- a/lib/rtplib.h +++ b/lib/rtplib.h @@ -33,7 +33,7 @@ struct rtp_payload_type { const codec_def_t *codec_def; - int for_transcoding:1; + unsigned int for_transcoding:1; }; diff --git a/recording-daemon/types.h b/recording-daemon/types.h index 7b792c739..435ae1dcc 100644 --- a/recording-daemon/types.h +++ b/recording-daemon/types.h @@ -54,7 +54,7 @@ struct stream_s { unsigned long tag; int fd; handler_t handler; - int forwarding_on:1; + unsigned int forwarding_on:1; }; typedef struct stream_s stream_t; @@ -91,7 +91,7 @@ struct ssrc_s { SSL *ssl; struct streambuf *tls_fwd_stream; struct poller tls_fwd_poller; - int sent_intro:1; + unsigned int sent_intro:1; }; typedef struct ssrc_s ssrc_t; @@ -134,8 +134,8 @@ struct metafile_s { int payload_ptimes[128]; int media_ptimes[4]; - int recording_on:1; - int forwarding_on:1; + unsigned int recording_on:1; + unsigned int forwarding_on:1; }; diff --git a/t/tests-preload.c b/t/tests-preload.c index 9906fc95b..7c6d011a3 100644 --- a/t/tests-preload.c +++ b/t/tests-preload.c @@ -22,8 +22,8 @@ typedef struct { wanted_protocol; char unix_path[256]; struct sockaddr_storage sockname; - int open:1, - bound:1; + unsigned int open:1, + bound:1; } socket_t; typedef struct {