Browse Source

TT#111150 Mark bit-fields explicitly with as unsigned

Whether a bit-field is signed or unsigned is implementation specific, so
we should be explicit about this.

Change-Id: I744df3d24bc08e95fa816ba4135f19cd3a5dcb17
Warned-by: lgtm
pull/1218/head
Guillem Jover 5 years ago
parent
commit
68797f4195
19 changed files with 135 additions and 135 deletions
  1. +3
    -3
      daemon/codec.c
  2. +2
    -2
      daemon/poller.c
  3. +1
    -1
      daemon/rtcp.c
  4. +6
    -6
      daemon/sdp.c
  5. +1
    -1
      include/bencode.h
  6. +11
    -11
      include/call.h
  7. +64
    -64
      include/call_interfaces.h
  8. +4
    -4
      include/codec.h
  9. +4
    -4
      include/crypto.h
  10. +3
    -3
      include/dtls.h
  11. +1
    -1
      include/ice.h
  12. +5
    -5
      include/media_socket.h
  13. +3
    -3
      include/stun.h
  14. +11
    -11
      include/t38.h
  15. +1
    -1
      kernel-module/xt_RTPENGINE.h
  16. +8
    -8
      lib/codeclib.h
  17. +1
    -1
      lib/rtplib.h
  18. +4
    -4
      recording-daemon/types.h
  19. +2
    -2
      t/tests-preload.c

+ 3
- 3
daemon/codec.c View File

@ -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;


+ 2
- 2
daemon/poller.c View File

@ -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 {


+ 1
- 1
daemon/rtcp.c View File

@ -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 {


+ 6
- 6
daemon/sdp.c View File

@ -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 {


+ 1
- 1
include/bencode.h View File

@ -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 */
};


+ 11
- 11
include/call.h View File

@ -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;
};


+ 64
- 64
include/call_interfaces.h View File

@ -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;
};


+ 4
- 4
include/codec.h View File

@ -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


+ 4
- 4
include/crypto.h View File

@ -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;
};


+ 3
- 3
include/dtls.h View File

@ -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;
};


+ 1
- 1
include/ice.h View File

@ -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;
};


+ 5
- 5
include/media_socket.h View File

@ -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[];


+ 3
- 3
include/stun.h View File

@ -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;
};


+ 11
- 11
include/t38.h View File

@ -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;
};


+ 1
- 1
kernel-module/xt_RTPENGINE.h View File

@ -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,


+ 8
- 8
lib/codeclib.h View File

@ -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;


+ 1
- 1
lib/rtplib.h View File

@ -33,7 +33,7 @@ struct rtp_payload_type {
const codec_def_t *codec_def;
int for_transcoding:1;
unsigned int for_transcoding:1;
};


+ 4
- 4
recording-daemon/types.h View File

@ -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;
};


+ 2
- 2
t/tests-preload.c View File

@ -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 {


Loading…
Cancel
Save