Commit Graph

25 Commits

Author SHA1 Message Date
Guy Harris 0cc59d38ab Replace the Large File Support CMake stuff.
The existing stuff doesn't appear to work (I tried it on 32-bit Ubuntu
18.04, and it did *not* add any flags to the compilation, as it appeared
not to conclude that they were necessary, even though they were).

Pull in the stuff from libpcap, which *does* appear to work.  (it does
so in my 32-bit Ubuntu testing).

This should fix #17301.

While we're at it, fix cppcheck.sh so that it doesn't attempt to run
cppcheck on files that have been deleted.
2021-03-22 12:11:26 +00:00
Moshe Kaplan 3dde70de2c .gitlab-ci: Generate cppcheck reports
Modify the cppcheck job to also generate cppcheck's reports
and provide them as artifacts to the user.
2020-10-15 19:39:11 +00:00
Martin Mathieson efd1f57057 cppcheck.sh: Suppress syntaxError
I've never seen anything useful in these - presumably code is build-tested.
2020-10-14 12:33:16 +00:00
Martin Mathieson 7e4ff6f826 cppcheck.sh and check_dissector_urls.py: Show which files are being examined.
Change-Id: Ib5ecb215050dea6bf2f03014d544dac49e56fe12
Reviewed-on: https://code.wireshark.org/review/37865
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-07-15 11:32:42 +00:00
Gerald Combs f0d456bf2d cppcheck: Fixup some comparisons.
Change-Id: I6901c31cdea7399bc18dbf968c14c477f71a90dd
Reviewed-on: https://code.wireshark.org/review/37777
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-07-08 01:56:18 +00:00
Gerald Combs e9a21e9f41 cppcheck: Bail if "-l <n>" or "-o" don't find any files.
If we've been passed "-l <n>" and the last <n> commits don't match any C
or C++ files or we've been passed "-o" and no files have been changed,
simply exit instead of testing the entire code base. We use "cppcheck.sh
-l <n>" in our CI system and the former behavior is much more useful
(and faster) than the latter.

Change-Id: I1127eabefa854d68f80b0a2dfd05e6895658abc0
Reviewed-on: https://code.wireshark.org/review/37773
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-07-07 18:18:45 +00:00
Martin Mathieson 45da818a53 Add internalAstError to suppressed errors from cppcheck.
cppcheck seems to get confused by the VALS() macro.

Change-Id: Iba59a4886a0461cea9797a09a10e67420b09af19
Reviewed-on: https://code.wireshark.org/review/37639
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-07-01 12:00:56 +00:00
Martin Mathieson 5258ceadb3 cppcheck: add a -o option to check modified or staged changes
Change-Id: I336400441302549967db048bedc70980b04c5030
Reviewed-on: https://code.wireshark.org/review/37613
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-30 06:28:48 +00:00
Martin Mathieson 14049d75fd cppcheck: add more include folders to look in.
Without this (particularly '.'), for some files it macro definitions cannot
be found the whole file is basically skipped.

Will make overall scan take quite a bit longer.

Change-Id: I7498b23ad9b27edd3a815c7fc51ef8501fa5a56a
Reviewed-on: https://code.wireshark.org/review/37567
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-06-28 14:47:44 +00:00
Moshe Kaplan 4d50fddfed cppcheck.sh: Add support for xml output with '-x'
Add an option of '-x' to tools/cppcheck.sh to support XML output.

Change-Id: I2921d7cd57ee9c925419247a0238b572f637c854
Reviewed-on: https://code.wireshark.org/review/37424
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-06-11 16:55:03 +00:00
Gerald Combs 45c6ba587d cppcheck: Exclude the doc directory.
Change-Id: I8d739c7cae7b1b5676cb04e7140d2dd81ebae1d3
Reviewed-on: https://code.wireshark.org/review/35168
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-21 04:55:44 +00:00
Gerald Combs ba62446a6a cppcheck: Re-ignore asn1.
The asn1 directory was moved to epan/dissectors back in 2016.

Change-Id: Id22c99fa4e0cacf19ab0c5a6055e71abf94f6159
Reviewed-on: https://code.wireshark.org/review/35074
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-12 19:31:12 +00:00
Gerald Combs a3c81d328f cppcheck: Make sure it's installed.
Change-Id: I1e33de118c8e022e63f4a2783927e05fe88c364c
Reviewed-on: https://code.wireshark.org/review/34305
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-08-16 19:16:55 +00:00
Gerald Combs 6193c3a5b4 cppcheck: Fix our target selection.
Change-Id: If0fdd7737150357026524a0884b938b809e1244f
Reviewed-on: https://code.wireshark.org/review/34277
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-08-13 22:34:16 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Gerald Combs 7d3fffc3f2 Tools: Add a "last n commits" option to cppcheck.sh.
Add a `-l n` option which will check the .c and .cpp files from the last
[n] commits.

Fix some shellcheck warnings.

Change-Id: I8185d6c6c5b08576315b47847795d210d47b042e
Reviewed-on: https://code.wireshark.org/review/33646
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-19 03:20:32 +00:00
Jaap Keuter 16cd981151 Tweak cppcheck to test with better settings
c99 is probably a better standard to check against.
Also try to cut down on ASN.1 template and config file testing,
since these fail anyway, not being full source files yet.

Change-Id: I289c35498cf9eba757e46601b4610f085ec4ba77
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/28019
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-06 05:20:43 +00:00
chinarulezzz dfb92c2a1d tools/cppcheck/cppcheck.sh: improve script; add new option: colorize html output
Change-Id: I34dad2fa9ea80529997103491219027edaf3ac41
Reviewed-on: https://code.wireshark.org/review/27080
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-24 03:51:17 +00:00
Dario Lombardo fdd426e410 spdx: more licenses converted.
Change-Id: Ia1650bc02511f7bd47fb90be91b623177f05bcbd
Reviewed-on: https://code.wireshark.org/review/26337
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-09 04:48:20 +00:00
Alexis La Goutte 757aa33220 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)

Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:48:06 +00:00
Evan Huus c17d706c8c Specify to CppCheck that Wireshark code is C89, not the default C11.
svn path=/trunk/; revision=49083
2013-04-28 23:30:29 +00:00
Evan Huus 90584f4655 Add verbose option to the cppcheck script.
svn path=/trunk/; revision=45542
2012-10-14 19:30:33 +00:00
Evan Huus 4930f6d820 Enhancements to the CppCheck script:
- make html output a flag (-h), instead of what happens when you
  specify no files
- add flag (-j) for job count, like make et al.
- add flag (-a) to ignore the suppressions file and report all issues
- require /bin/bash instead of just /bin/sh in order to get arithmetic $(())
- add mode-lines

svn path=/trunk/; revision=45520
2012-10-13 02:03:18 +00:00
Evan Huus e70e0e6bfc Enhancements to the cppcheck script:
- Take command-line arguments of files to check. In this case make output
  GCC-like, as it's much more human-readable than the HTML.
- If there are no arguments, provide HTML output for the entire current
  directory like before, for use with build-bot integration.
- Don't hack with the CWD to try and get include-paths to work. Cppcheck
  will warn already if it can't find them, and since a lot of the checks
  still work in any case, a warning is more appropriate than an error or
  a hack.

svn path=/trunk/; revision=43882
2012-07-21 02:43:10 +00:00
Evan Huus 6e8258be9a Add basic CppCheck configuration and runner.
Probably subject to change as it gets integrated into the build-bot.

svn path=/trunk/; revision=43778
2012-07-18 02:30:35 +00:00