Commit Graph

9 Commits

Author SHA1 Message Date
Tomasz Moń 893a2d9c62 MSVC: Warn about unused formal parameters
Provide _U_ macro definition for Visual Studio.

Change the way _U_ macro is ifdefed for some targets to allow Visual
Studio to recognize it.

Ping-Bug: 15832
Change-Id: Ic7ce145cbe9e8aa751d64c9c09ce8ba6c1bbbd30
Reviewed-on: https://code.wireshark.org/review/34530
Tested-by: Petri Dish Buildbot
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-09-21 08:51:34 +00:00
Dario Lombardo 8cd389e161 replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
The first is deprecated, as per https://spdx.org/licenses/.

Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed
Reviewed-on: https://code.wireshark.org/review/25661
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 14:57:36 +00:00
Gerald Combs 775bbbcded Start using SPDX license identifiers.
A while back Graham pointed out the SPDX project (spdx.org), which is
working on standardizing license specifications:

https://www.wireshark.org/lists/wireshark-dev/201509/msg00119.html

Appendix V of the specification describes a short identifier
(SPDX-License-Identifier) that you can use in place of boilerplate in
your source files:

https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b

Start the conversion process with our top-level C and C++ files.

Change-Id: Iba1d835776714deb6285e2181e8ca17f95221878
Reviewed-on: https://code.wireshark.org/review/24302
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-09 20:03:51 +00:00
Guy Harris a0973d0f94 Move the compiler version tests to ws_compiler_tests.h and use them elsewhere.
While we're at it, sort some header file lists, and clean up white
space.

Change-Id: If737dda45334fedf1df7295d8719ad9381daf7a1
Reviewed-on: https://code.wireshark.org/review/24089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-26 22:01:16 +00:00
Guy Harris 6d092c1344 Whitespace cleanups.
Change-Id: Ic19c143fc9143da230f286f1fe4aecc0fe8b08be
Reviewed-on: https://code.wireshark.org/review/24085
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-26 18:39:22 +00:00
Guy Harris 985a8f297b Move a comment to where it belongs, expand another comment.
Change-Id: I04eff374132cbe4b93271c7a43303db406998bcb
Reviewed-on: https://code.wireshark.org/review/24084
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-26 18:25:15 +00:00
Guy Harris fb160e53c8 Use more than just "does it claim to be GCC?" to test for attributes.
Not all versions of GCC or Clang have the returns_nonnull function
attribute, so use the same technique used in current master branch
libpcap - use __has_attribute() if it's available, otherwise use
compiler version tests.

This also lets us use WS_NORETURN on some non-GCC compilers.

Change-Id: I6ca4a81797ebfca9f743e16f83839c49d303da81
Reviewed-on: https://code.wireshark.org/review/24083
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-26 18:19:49 +00:00
João Valverde ac804b59e2 Improve our inet_ntop() wrapper
Also fix buffer length define, as it is not guaranteed to be 46 on
Windows (it never was guaranteed anyway for the libc implementation,
but the likelyhood of being greater was small).

Change-Id: I2db705d86f825765ed32ec70b8d22058b5d629e8
Reviewed-on: https://code.wireshark.org/review/24074
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-26 14:39:00 +00:00
João Valverde d0a91b27f2 plugins: config.h must not be included by public headers
For a sane plugin build environment. Include config.h as the first
header in the .c file instead.

Fix by moving required compiler attribute macros to a new
"ws_attributes.h" API header.

Change-Id: I34f58a927f68c1a0e59686c14d214825149749e1
Reviewed-on: https://code.wireshark.org/review/23400
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-06 08:10:56 +00:00