diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-12-26 05:57:06 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-12-26 05:57:06 +0000 |
commit | 8ed7a73e22c049a2e013bb436e599bff41fc5b9b (patch) | |
tree | ad4a4cc6fb4ff4d3e3ffe3a3f8e3d056e441ae46 /epan/dissectors/packet-rtsp.c | |
parent | 8ede6b7dc09aa636f87147ab432a137c209e8aca (diff) |
Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().
Change some data types to avoid those implicit conversion warnings.
When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.
Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers. Cast
away those warnings in some cases where an API we don't control forces
us to do so.
Enable a bunch of additional warnings by default. Note why at least
some of the other warnings aren't enabled.
randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.
If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.
svn path=/trunk/; revision=46748
Diffstat (limited to 'epan/dissectors/packet-rtsp.c')
-rw-r--r-- | epan/dissectors/packet-rtsp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-rtsp.c b/epan/dissectors/packet-rtsp.c index 0d19104caf..d2e464b08e 100644 --- a/epan/dissectors/packet-rtsp.c +++ b/epan/dissectors/packet-rtsp.c @@ -460,7 +460,7 @@ is_rtsp_request_or_reply(const guchar *line, size_t linelen, rtsp_type_t *type) if (tokenlen >= 3) { memcpy(response_chars, next_token, 3); response_chars[3] = '\0'; - rtsp_stat_info->response_code = strtoul(response_chars, NULL, 10); + rtsp_stat_info->response_code = (guint)strtoul(response_chars, NULL, 10); } } return TRUE; @@ -678,7 +678,7 @@ rtsp_get_content_length(const guchar *line_begin, size_t line_len) up = p; if (up == tmp || (*up != '\0' && !isspace(*up))) return -1; /* not a valid number */ - return content_length; + return (int)content_length; } static const char rtsp_Session[] = "Session:"; @@ -1060,7 +1060,7 @@ dissect_rtspmessage(tvbuff_t *tvb, int offset, packet_info *pinfo, tvb_format_text(tvb, value_offset, value_len)); - offset = offset + STRLEN_CONST(rtsp_content_type); + offset = offset + (int)STRLEN_CONST(rtsp_content_type); /* Skip wsp */ offset = tvb_skip_wsp(tvb, offset, value_len); semi_colon_offset = tvb_find_guint8(tvb, value_offset, value_len, ';'); |