gcc-4.0.1 (new debian default) emits a couple of warnings in the dccp code, this patch silences them.
[DCCP]: Fix compiler warnings may be a false warning if there always is something on ccid3hcrx_hist: net/dccp/ccids/ccid3.c: In function 'ccid3_hc_rx_packet_recv': net/dccp/ccids/ccid3.c:1634: warning: 'tstamp.tv_usec' may be used uninitialized in this function net/dccp/ccids/ccid3.c:1634: warning: 'tstamp.tv_sec' may be used uninitialized in this function const on inline functions doesn't have any effect: net/dccp/dccp.h:64: warning: type qualifiers ignored on function return type net/dccp/dccp.h:70: warning: type qualifiers ignored on function return type net/dccp/dccp.h:76: warning: type qualifiers ignored on function return type Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]> --- commit 61c35025d8d825567618f141f44f69cee0e629ef tree 3fedbe960e9ce1363ef73c3cd12befb18b386e6e parent e39daca1931b8ab2ef847a1c2e627b818b924d2a author Patrick McHardy <[EMAIL PROTECTED]> Sun, 14 Aug 2005 19:08:18 +0200 committer Patrick McHardy <[EMAIL PROTECTED]> Sun, 14 Aug 2005 19:08:18 +0200 net/dccp/ccids/ccid3.c | 2 +- net/dccp/dccp.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c @@ -1631,7 +1631,7 @@ static u32 ccid3_hc_rx_calc_first_li(str struct ccid3_hc_rx_sock *hcrx = dp->dccps_hc_rx_ccid_private; struct dccp_rx_hist_entry *entry, *next, *tail = NULL; u32 rtt, delta, x_recv, fval, p, tmp2; - struct timeval tstamp, tmp_tv; + struct timeval tstamp = { 0 }, tmp_tv; int interval = 0; int win_count = 0; int step = 0; diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h @@ -60,19 +60,19 @@ extern void dccp_time_wait(struct sock * extern struct proto dccp_v4_prot; /* is seq1 < seq2 ? */ -static inline const int before48(const u64 seq1, const u64 seq2) +static inline int before48(const u64 seq1, const u64 seq2) { - return (const s64)((seq1 << 16) - (seq2 << 16)) < 0; + return (s64)((seq1 << 16) - (seq2 << 16)) < 0; } /* is seq1 > seq2 ? */ -static inline const int after48(const u64 seq1, const u64 seq2) +static inline int after48(const u64 seq1, const u64 seq2) { - return (const s64)((seq2 << 16) - (seq1 << 16)) < 0; + return (s64)((seq2 << 16) - (seq1 << 16)) < 0; } /* is seq2 <= seq1 <= seq3 ? */ -static inline const int between48(const u64 seq1, const u64 seq2, const u64 seq3) +static inline int between48(const u64 seq1, const u64 seq2, const u64 seq3) { return (seq3 << 16) - (seq2 << 16) >= (seq1 << 16) - (seq2 << 16); }