Commit Graph

6 Commits

Author SHA1 Message Date
Gerald Combs 5f0672d749 Add initial Clang-Tidy configuration files and a CI check
Add an initial Clang-Tidy configuration file which checks for recursion
and various clang analyzer issues.

Run Clang-Tidy in the "Clang + Code Checks" merge request job.

Add NOLINT suppressions where needed in wsutil, epan, and lemon.
2024-02-19 19:00:52 -08:00
Gerald Combs 4d5c4154b1 Convert wmem to C99 types
Ping #19116.
2023-06-17 17:38:53 +00:00
John Thacker dd2ca75184 wmem: Allow integer lookups with a null tree
wmem_tree currently returns NULL for lookups of strings with
a NULL tree, but tries to dereference the tree and crashes when
looking up integers with a NULL tree. Return NULL (or FALSE, for
contains32()) for a tree that doesn't exist, making it easier to
lazily create a tree only when inserting an entry.
2023-05-09 14:25:47 +00:00
João Valverde a66b5080c3 Make wmem and wsutil a single logical library
We want to do more sophisticated processing of UTF-8 in wmem and
for that we want to use the unicode utility functions in wsutil.

We also want to use wmem scoped memory in wsutil unicode utility
functions.

This introduces a circular dependency. Fix that by making both
the same library and removing the sanitary cordon separating
them.

We still need to be mindful of public header  depencies of wmem on
wsutil because wmem.h is included in wireshark.h and we want to
be parsimonious with the use of global includes.
2023-02-08 11:21:19 +00:00
Martin Mathieson e3ce838a3e UDPCP: seq-num analysis, and match data and ACKs 2022-09-15 08:19:51 +00:00
João Valverde 7f9c1f5f92 Move wmem to wsutil
This allows wmem to be used from other libraries, namely wsutil.
It is often the case that a funtion exists in wsutil and cannot
be used with a wmem scope, requiring some code duplication or
extra memory allocations, or vice-versa, code in epan cannot be
moved to wsutil because it has a wmem dependency.

To this end wmem is moved to wsutil. Scope management remains part
of epan because those scope semantics are specific to dissection.
2021-07-26 14:56:11 +00:00