Commit Graph

8 Commits

Author SHA1 Message Date
matt335672 2f46ef27a2 Add support for cppcheck 2.17.0
cppcheck 2.17.0 adds checks that a NULL pointer returned from malloc() and
calloc() is not used.

We do this quite a lot.

I've addressed this by adding functions g_malloc_nofail() and
g_calloc_nofail() which either allocate memory or abort.
functions are now called in places where we are not making these
checks.

Many of these checks are in test programs or example programs.

I've modified the list16 module to handle out-of-memory conditions.
2025-02-27 15:04:11 +00:00
firewave fb9c175b11 enabled and fixed -Wmissing-prototypes compiler warnings
Co-authored-by: matt335672 <30179339+matt335672@users.noreply.github.com>
2024-04-23 18:38:20 +02:00
Alexandre Quesnel 6479d54eaa Migrating logging to LOG() and LOG_DEVEL() in tests/* 2021-03-26 13:58:27 +00:00
Alexandre Quesnel 5810cd9fe9 Fixing formatting with astyle in tests/* 2021-03-26 00:59:16 +00:00
Jay Sorg 1c3d23da37 tests: add get_alloced_bytes function 2013-08-23 17:03:55 -07:00
Jay Sorg 110edd31c8 fix Makefile error, fix for warnings 2013-07-08 12:46:31 -07:00
Jay Sorg bddf48602d optimize libmem.c 2013-06-28 22:11:15 -07:00
Jay Sorg a330226dd9 added libmem and a test 2013-06-28 19:37:03 -07:00