Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] master 0d2dd00: Fix -Wabsolute-value in
From: "Maynard, Chris" <Christopher.Maynard@xxxxxxxxx>
Date: Sat, 15 Mar 2014 10:32:21 -0400
I don't think this is the correct fix. The intent was to get the absolute value of the *difference* between 2 values, which could be negative, hence "abs(a - b)". -----Original Message----- From: wireshark-commits-bounces@xxxxxxxxxxxxx [mailto:wireshark-commits-bounces@xxxxxxxxxxxxx] On Behalf Of Wireshark code review Sent: Saturday, March 15, 2014 7:38 AM To: wireshark-commits@xxxxxxxxxxxxx Subject: [Wireshark-commits] master 0d2dd00: Fix -Wabsolute-value in ICMP dissector (found by Clang 3.5) URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=0d2dd005647d173959fdd1794ff04840eb5e8cd4 Submitter: Anders Broman (a.broman58@xxxxxxxxx) Changed: branch: master Repository: wireshark Commits: 0d2dd00 by Alexis La Goutte (alexis.lagoutte@xxxxxxxxx): Fix -Wabsolute-value in ICMP dissector (found by Clang 3.5) packet-icmp.c:1245:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value] packet-icmp.c:1245:7: note: remove the call to 'abs' since unsigned values cannot be negative packet-icmp.c:1245:30: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value] packet-icmp.c:1245:30: note: remove the call to 'abs' since unsigned values cannot be negative packet-icmp.c:1254:6: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value] packet-icmp.c:1254:6: note: remove the call to 'abs' since unsigned values cannot be negative packet-icmp.c:1254:29: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value] packet-icmp.c:1254:29: note: remove the call to 'abs' since unsigned values cannot be negative packet-icmp.c:1623:7: error: taking the absolute value of unsigned type 'guint32' (aka 'unsigned int') has no effect [-Werror,-Wabsolute-value] packet-icmp.c:1623:7: note: remove the call to 'abs' since unsigned values cannot be negative packet-icmp.c:1629:7: error: taking the absolute value of unsigned type 'guint32' (aka 'unsigned int') has no effect [-Werror,-Wabsolute-value] packet-icmp.c:1629:7: note: remove the call to 'abs' since unsigned values cannot be negative Change-Id: I6b344d01b8239fb93aedf95d954ef1243ba45a6b Reviewed-on: https://code.wireshark.org/review/673 Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx> Actions performed: from 3094062 Use constants instead of vwr->STATS_LEN in some cases. adds 0d2dd00 Fix -Wabsolute-value in ICMP dissector (found by Clang 3.5) Summary of changes: epan/dissectors/packet-icmp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ___________________________________________________________________________ Sent via: Wireshark-commits mailing list <wireshark-commits@xxxxxxxxxxxxx> Archives: http://www.wireshark.org/lists/wireshark-commits Unsubscribe: https://wireshark.org/mailman/options/wireshark-commits mailto:wireshark-commits-request@xxxxxxxxxxxxx?subject=unsubscribe CONFIDENTIALITY NOTICE: The information contained in this email message is intended only for use of the intended recipient. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately delete it from your system and notify the sender by replying to this email. Thank you.
- Prev by Date: Re: [Wireshark-dev] [Wireshark-commits] master 04c39bb: Add Lua heuristic dissector support
- Next by Date: [Wireshark-dev] docbook/README.txt out of date
- Previous by thread: Re: [Wireshark-dev] [Wireshark-commits] master 04c39bb: Add Lua heuristic dissector support
- Next by thread: [Wireshark-dev] docbook/README.txt out of date
- Index(es):