Commit Graph

72923 Commits

Author SHA1 Message Date
Guy Harris a6dc0c27fc Don't use -Werror with Apple's llvm-gcc.
Its handling of warnings, and of warnings-treated-as-errors, is horribly
broken; once you've asked for a warning, and have specified -Werror,
there appears to be nothing whatsoever that you can do to keep that
warning from being an error *everywhere* in the code.

Prior to change Ib591a1d6beaa13337d927a446b4d8d5e687ff610, the tests for
warnings were all failing on the macOS buildbot, so *no* warnings were
being requested.

With this change, a warning won't be reported as an error, but at least
it'll be reported.

(We should probably switch to using Clang on the macOS buildbot at some
point; I don't know whether the version of Clang currently on the
buildbot is safe to use, but if we ever run a newer version of Xcode,
which doesn't come with llvm-gcc - which may involve running a newer
version of macOS on the buildbot as well - it's presumably safe, given
that it's the only compiler Apple shipped.)

Change-Id: I677967cb87b91f68f08de546e59abff1dbd6788b
Reviewed-on: https://code.wireshark.org/review/29623
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-12 04:22:33 +00:00
Peter Wu 91c5942c93 QUIC: implement packet coalescing (draft >= 11)
Messages with long headers have a payload length while short header
messages extend to the end of a datagram.

Create a new tvb for every message since the decryption routines assume
that the header starts from the beginning of the tvb.

quic_get_message_tvb tries to avoid throwing exceptions in most cases if
the (payload) length is too large such that dissection can proceed until
the payload is encountered. (One edge case is when the varint cannot
even be read, but then indeed the message is severely malformed.)

Change-Id: Id42f55dfd73905b709b218002b9ca660f6f703f1
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/29607
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-12 03:57:27 +00:00
Guy Harris 4bab4b2e0c OK, try to prevent -Wunused-function warnings with llvm-gcc as well.
Change-Id: I53e48eb14d157eacd24322fb978f039e57377ed8
Reviewed-on: https://code.wireshark.org/review/29622
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-12 03:23:12 +00:00
Guy Harris 47b1ec984b Fix WITHOUT_VALS.
It was setting EF_TYPE and then clearing it; it should set EF_TYPE and
clear EF_VALS.

Change-Id: Ie0a85a12646c0395e50abb34caf32367e4191da0
Reviewed-on: https://code.wireshark.org/review/29621
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-12 02:07:27 +00:00
Guy Harris 69a01b650a With llvm-gcc, just don't do -Wshorten-64-to-32.
If you specify -Werror and -Wshorten-64-to-32, there does not appear to
be any way to get llvm-gcc *NOT* to treat those warnings as errors - not
with pragmas, and not even with -Wno-error=shorten-64-to-32.

Change-Id: Ia82df3f548085cca8d187c4b43c02060b87f0542
Reviewed-on: https://code.wireshark.org/review/29620
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-12 01:28:57 +00:00
Guy Harris 2f65fbae4e -Wcomma isn't supported by llvm-gcc, so don't make it a non-error.
Replace a tab in an arguments string with a space while we're at it.

Change-Id: Iee6ce920fbd7a883fb23bc798abb7f965e3757e6
Reviewed-on: https://code.wireshark.org/review/29619
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-12 00:50:55 +00:00
Guy Harris a8024f1dc0 Just spaces between -W arguments.
Ninja, at least, complains about tabs.

Change-Id: I65c3458dadc7096773084864d5e3970d1d9d580d
Reviewed-on: https://code.wireshark.org/review/29618
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 23:15:56 +00:00
Guy Harris 8e0d8acadc WERROR_COMMON_FLAGS isn't a list, so don't treat it as one.
Change-Id: Iea0b39a61fade5ac87ed31efaf8c1c7a90aa4fb7
Reviewed-on: https://code.wireshark.org/review/29617
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 22:11:52 +00:00
Guy Harris b09f27ce0f Add the -Wno-error= flags to the correct variable.
Change-Id: I61896b959da1a7cbdb0faab99b60b57d1c00cbb7
Reviewed-on: https://code.wireshark.org/review/29616
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 21:40:27 +00:00
Peter Wu 46b2701626 QUIC: ensure handshake keys availability before PKN
Prepare for PKN decryption (draft -12) during the initial handshake.

Ping-Bug: 13881
Change-Id: I675086f732e39679bcb94e2e20da3d4bd40d0f2e
Reviewed-on: https://code.wireshark.org/review/29606
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-11 21:14:17 +00:00
Guy Harris 87887802ef Put the -Wno-error= options after -Werror.
It appears that -Werror overrides them, at least with llvm-gcc; I guess
the options are evaluated in order.

Change-Id: I0fd9e544a8e191a8950e17e97513912034763645
Reviewed-on: https://code.wireshark.org/review/29615
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 21:11:21 +00:00
Guy Harris 7533398f65 OK, try just suppressing the "-Wunused-function" warning with llvm-gcc.
Was Apple trying to release a game for Mac OS X, somewhat resembling
Whack-A-Mole, when they went into the lab and had Igor help them stitch
together the GCC front end and the LLVM back end?

Change-Id: If08392c3d244a83f50f62b4d7c878ae9a274ec4b
Reviewed-on: https://code.wireshark.org/review/29614
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 20:46:43 +00:00
Guy Harris ff31ed8c4c Go back to using a #pragma directly.
See if *that* prevents us from failing with a warning;
-Wno-error=unused-function doesn't seem to do the trick.

Change-Id: If2dec4ca70451670d0181c6cd0c7bc714e856c95
Reviewed-on: https://code.wireshark.org/review/29613
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 20:09:05 +00:00
Guy Harris f7346284ac More selectively prevent warnings from becoming errors.
Always use -Werror if it's supported, even with Apple's llvm-gcc, and
only use -Wno-error= with llvm-gcc.  Use -Wno-error= with all the errors
we get in the buildbot.

Change-Id: I6797f064d2d354f979e24fcb04f592e9313af721
Reviewed-on: https://code.wireshark.org/review/29612
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 19:43:15 +00:00
Guy Harris 4207660996 Revert "Make versions of DIAG_OFF() and DIAG_ON() for GCC 4.2 through 4.5."
This reverts commit f6b8bc39c6.

Reason for revert: prior to 4.6 or so, the pragmas didn't work as well,
e.g. they couldn't be used inside a function; we depend on them being
usable within a function.

Change-Id: I7a7a0c08a2aca553233c237b8b6c43115095804e
Reviewed-on: https://code.wireshark.org/review/29610
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 18:54:02 +00:00
Guy Harris b7685821c1 Don't use -Werror with llvm-gcc.
Apple's llvm-gcc appears not to support suppressing warnings with
pragmas, so, if we're building on a Mac (we check for APPLE), and we're
not using Clang, we don't turn on -Werror, because we rely on those
pragmas to suppress otherwise-unremovable warnings in order to build
warning-free.

Change-Id: I43bd1ab42918c6ba22643b4a2d4cc3618c25434b
Reviewed-on: https://code.wireshark.org/review/29609
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 18:36:11 +00:00
Alexis La Goutte 342f7d2987 ieee80211: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I27c82383987aa4da3bf86c5abc0d467252be5c80
Reviewed-on: https://code.wireshark.org/review/29599
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-11 17:38:02 +00:00
Richard Sharpe 71378072e6 ieee80211: Fix some issues with the D3.0 support.
The ieee80211ax D3.0 support got merged accidentally with some issues.

This fixes the remainder of those issues.

Change-Id: I2a3a427e04cb1dca076fd761458de92d4d5e0df2
Reviewed-on: https://code.wireshark.org/review/29602
Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-11 16:16:06 +00:00
Alexis La Goutte c525578aff QUIC: Remove draft-10 support
Bug: 13881
Change-Id: I11270c6be4304a5d37216cb2e09ae0d4149091b0
Reviewed-on: https://code.wireshark.org/review/29603
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-09-11 16:03:32 +00:00
AndersBroman 351ea5940e nas5gs: 9.10.4.7 PDU address. IPv6 type is a 8 byte link local address.
Change-Id: Ic83fd7fe2480946201732b38f42596f346ba48f5
Reviewed-on: https://code.wireshark.org/review/29601
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-11 13:57:37 +00:00
Pascal Quantin 54e8956544 Diameter: add ALU AVP 1016
Bug: 15129
Change-Id: I10114219841af8fe9789e03dbc29198ed4b5830e
Reviewed-on: https://code.wireshark.org/review/29598
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-09-11 10:52:20 +00:00
Guy Harris f94cfa0cdc Some older compilers don't allow diagnostic pragmas inside a function.
Change-Id: I7ed32cfdd1c7a308acf5ef2cca9fde28dda5563e
Reviewed-on: https://code.wireshark.org/review/29600
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 10:43:36 +00:00
Stig Bjørlykke 4df2fcb0ee Qt: Replace $HOME with ~ in window title %F variable
Replace $HOME with ~ in window title %F variable.
Optimize code to check if variable is used before doing replacement.

Change-Id: I95ef8505e50379d98fdb1661e09394d1ded7ecca
Reviewed-on: https://code.wireshark.org/review/29597
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-11 09:19:56 +00:00
Guy Harris f6b8bc39c6 Make versions of DIAG_OFF() and DIAG_ON() for GCC 4.2 through 4.5.
The macOS buildbot is currently using llvm-gcc, which is based on GCC
4.2.

Change-Id: I8497243333410380e1d0bc7fa35bccbf841cada1
Reviewed-on: https://code.wireshark.org/review/29596
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 07:31:31 +00:00
Guy Harris 259bdc7e63 Use DIAG_OFF to suppress -Wunused-function.
Change-Id: I1846e4ef1be977553510ff1473d4c1a7e12cce18
Reviewed-on: https://code.wireshark.org/review/29594
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 06:59:19 +00:00
Guy Harris 82d5c1c770 Squelch more narrowing warnings.
Change-Id: I1bd9f8c048af29abc26eb85f814dd4ec8663501c
Reviewed-on: https://code.wireshark.org/review/29593
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 06:06:14 +00:00
Guy Harris bab0c1d297 "#if 0" out an unused variable.
Change-Id: I78cd22e7d7b43e072c71f21ba13aa56ce83afa15
Reviewed-on: https://code.wireshark.org/review/29592
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 06:02:04 +00:00
Guy Harris a6c30496df sizeof isn't useful when calculating the size of data in the packet.
Srsly, you're dealing with *one-byte*, *two_byte*, and *four-byte*
values, might as well say "1", "2", and "4" - either sizeof(guint8) is
guaranteed to be 1, sizeof(guint16) is guaranteed to be 2, and
sizeof(guint32) is guaranteed to be 4, in which case you might as well
just use 1, 2, and 4, or they're *not* guaranteed to be 1, 2, and 44, in
which case you *have* to use 1, 2, and 4, because a value other than 1,
2, or 4 is invalid.

Change-Id: I49b354cd619f6fe8d625af0322f4861ad8f9b1f1
Reviewed-on: https://code.wireshark.org/review/29591
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 05:12:31 +00:00
João Valverde 0d123e5a24 CMake: Remove some redundant and overly verbose code
The original reason for having a WARN_FLAGS set of variables has
been lost.

Change-Id: I3eae3cf9d0bad5f3895f6fee59c2c64183c8f244
Reviewed-on: https://code.wireshark.org/review/29526
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-11 05:05:37 +00:00
Richard Sharpe ad6eb33684 WIP:ieee80211.c: Add support for D3.0 of 802.11ax
This changeset merges in the changes that have been tested in a resent
test event at the WFA. It will not dissect older D2.x packet captures.

Change-Id: Id38a27a61a6a2a083575448e5c59a8e190827e6d
Reviewed-on: https://code.wireshark.org/review/29512
Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-11 05:04:50 +00:00
Chris Bontje 273ca2c8bb [packet-dnp.c] - Better solution for handling malformed messages containing "empty objects" with misreported counts.
- this change re-enables dissection of large lists of sequential objects lacking prefixes.
- corrected some object/variation text in the comments

Change-Id: Ia410f53198e9918509208739c94dbb4df4ecfc25
Reviewed-on: https://code.wireshark.org/review/29582
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-11 05:03:38 +00:00
Guy Harris f240eaf6f2 Squelch a narrowing warning.
Change-Id: Ibe75903250dd9cccd2b4a80d1215f5ea6fd0cce2
Reviewed-on: https://code.wireshark.org/review/29590
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 04:53:21 +00:00
Guy Harris 3a7bec1586 Squelch a narrowing warning.
Change-Id: I5ff9095208956b9e40e5820986e0253ec2a76116
Reviewed-on: https://code.wireshark.org/review/29589
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 04:32:16 +00:00
Guy Harris e1ef55f2fc Avoid collision between parameter names and function names.
Change-Id: I206d05c47c9f9089a201783ae2d0856c97a5e502
Reviewed-on: https://code.wireshark.org/review/29588
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 04:29:54 +00:00
Uli Heilmeier fe0539b41f MGCP: Ignore case for command header
Bug: 15008
Change-Id: Ibfd9bd8d9d93ddac8c5441be9f5e27c3e095c11b
Reviewed-on: https://code.wireshark.org/review/29502
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-11 04:11:56 +00:00
Alexis La Goutte 8d5f88db1d docsis: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I2d7e2d2c83dddc666c7ef85727af986b65b12a13
Reviewed-on: https://code.wireshark.org/review/29567
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Andrii Vladyka <a.vladyka@ukr.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-11 04:09:00 +00:00
Guy Harris 0bfd7c11fe Don't fill in a variable if you don't use the value.
Change-Id: I50c9cf5daa22c9d53e6ca642e6651948a04e8e64
Reviewed-on: https://code.wireshark.org/review/29587
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 04:08:38 +00:00
Guy Harris 33e5f0eba2 sizeof isn't useful when calculating the size of data in the packet.
Srsly, you're dealing with *four-byte* value, might as well say "4" -
either sizeof(guint32) is guaranteed to be 4, in which case you might as
well just use 4, or it's *not* guaranteed to be 4, in which case you
*have* to use 4, because a value other than 4 is invalid.

Change-Id: I6deb106f326e9402744a2e728468b3ce4c220b02
Reviewed-on: https://code.wireshark.org/review/29586
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 03:42:50 +00:00
Guy Harris 5bd04a317d sizeof isn't useful when adding to an offset into the packet.
Srsly, you're fetching a *two-byte* value, might as well say "2" -
either sizeof(guint16) is guaranteed to be 2, in which case you might as
well just use 2, or it's *not* guaranteed to be 2, in which case you
*have* to use 2, because a value other than 2 is invalid.

Change-Id: I9da8dc66d3a77e98cb0a0a5501655594c509eb87
Reviewed-on: https://code.wireshark.org/review/29585
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 03:20:23 +00:00
João Valverde 23c106b86c Fix the build on the OSX buildbot
Change-Id: Ia3efd8d4fb002cffadeb86620eea4bdceb1357b6
Reviewed-on: https://code.wireshark.org/review/29584
Reviewed-by: João Valverde <j@v6e.pt>
2018-09-10 23:07:08 +00:00
João Valverde 0d2c284744 f5ethtrailer: Add some casts to squelch narrowing warning.
Change-Id: If8cef41c69f397af2e36bb35ffa596fa656e8401
Reviewed-on: https://code.wireshark.org/review/29583
Reviewed-by: João Valverde <j@v6e.pt>
2018-09-10 22:47:27 +00:00
João Valverde 02b64aa1b7 Avoid using -Werror with generated code.
Change-Id: I5812eeedd1c6f53b62417a53f3613c2af476634c
Reviewed-on: https://code.wireshark.org/review/29510
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-09-10 22:27:04 +00:00
Graham Bloice 8343e411f8 rtp-ed137: squelch checkAPI warning about shadowed variable
Change-Id: If9ae00895f12eeeda7590be62e1057397cc88c51
Reviewed-on: https://code.wireshark.org/review/29581
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2018-09-10 21:59:45 +00:00
Jano Svitok fd73dad177 MBIM: Dissect UUID_MS_UICC_LOW_LEVEL/MBIM_CID_MS_UICC_ATR
Change-Id: Ie2d4f2d7a4f38e9f56d8c35cdbddfef20a61ef23
Reviewed-on: https://code.wireshark.org/review/29577
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-09-10 21:41:57 +00:00
Jano Svitok a89266c337 MBIM: MBIM_CID_MS_PROVISIONED_CONTEXT_V2 Query is legal
InformationBuffer must be empty

Change-Id: I78367fc540122af099c3d9ab020b210ba112d997
Reviewed-on: https://code.wireshark.org/review/29576
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-10 21:29:58 +00:00
Guy Harris bba021dd30 Remove the probes.
(It's llvm-gcc, and appears to be a version too old to support
_Pragma("gcc diagnostic ...").)

Change-Id: I220997890636d5a5c33889d2e6c640feee155deb
Reviewed-on: https://code.wireshark.org/review/29580
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-10 21:24:50 +00:00
Guy Harris 6ef4e54f27 Maybe we have to treat llvm-gcc specially.
Change-Id: I73aa608a31a79fa58cb5a86aceaaa778adf0aa2c
Reviewed-on: https://code.wireshark.org/review/29579
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-10 21:04:20 +00:00
Guy Harris 51ee234eee Test with (llvm-)GCC pragmas, as the buildbot builds with llvm-gcc.
Change-Id: Ic1dd2e4d17cabb1cd62f8b1ad211dc6915835359
Reviewed-on: https://code.wireshark.org/review/29578
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-10 20:44:59 +00:00
Guy Harris d061b94ab6 Test what kind of compiler we have running on the macOS buildbot.
Change-Id: Ib1a14256ce0fbcfa357368e8431705606a8412e0
Reviewed-on: https://code.wireshark.org/review/29574
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-10 20:17:21 +00:00
Stig Bjørlykke 400f748b04 Qt: Add some window title variables
Add some new variables to be used in custom window title.

%F = file path of the capture file
%S = a conditional separator (" - ") that only shows when surrounded
     by variables with values or static text

Change-Id: I20a60a3018cc86236f4991030eadb7f51681cc32
Reviewed-on: https://code.wireshark.org/review/29534
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-10 19:50:55 +00:00