* Improve configuration of g_try_realloc and g_try_realloc_n
* Mark g_realloc and similar functions as realloc functions
* Remove g_new, g_new0, etc as <alloc> functions, these are defined as
macros and handled as the functions they're expanded to.
* Add tests. TODO tests will be resolved by using the library
configuration in the checker.
* Allow to configure realloc like functions
* memleakonrealloc: Bring back tests.
The old memleak checker was removed, and the tests for it was removed in
commit 9765a2dfab. This also removed the
tests for memleakOnRealloc. Bring back those tests, somewhat modified
since the checker no longer checks for memory leaks.
* Add realloc to mem leak check
* Add tests of realloc buffer size
* Configure realloc functions
* Add test of freopen
* Allow to configure which element is realloc argument
* Fix wrong close in test
cppcheck now warns for this
* Update manual
* Update docs
* Rename alloc/dalloc/realloc functions
Naming the member function realloc caused problems on appveyor. Rename
the alloc and dealloc functions as well for consistency.
* Change comparisson order
* Remove variable and use function call directly
* Create temporary variable to simplify
* Throw mismatchError on mismatching allocation/reallocation
* Refactor to separate function
* Fix potential nullptr dereference
As pointed out by cppcheck.
* Fix#9047 (c-style casts before malloc)
Note that there are still no warnings for c++-style casts
* Fix memleak check with casts of assignments in if-statements
* Fix possible null pointer dereference
As pointed out by cppcheck.
* Add check of astOperand2 when removing casts
This is similar to how it is done in other checks.
From the Gnome Developer documentation
(https://developer.gnome.org/glib/stable/glib-Memory-Allocation.html):
If any call to allocate memory using functions g_new(), g_new0(),
g_renew(), g_malloc(), g_malloc0(), g_malloc0_n(), g_realloc(), and
g_realloc_n() fails, the application is terminated. This also means
that there is no need to check if the call succeeded. On the other
hand, g_try_...() family of functions returns NULL on failure that
can be used as a check for unsuccessful memory allocation. The
application is not terminated in this case.
g_new(), g_new0() and g_renew() are defines using g_malloc(),
g_malloc0() and g_realloc() respectively, so there is no need to change
those.
* gtk.cfg: Add/improve g_ascii_*() functions
Found via daca@home
* gtk.cfg: Add `<const/>` where applicable (forgotten in last commit)
* gtk.cfg: Add `<valid>0:255</valid>` for `gchar` ASCII value arguments