cppcheck/addons/test/y2038
Sebastian fb96e5433a
y2038 addon: Fix that check can never return True, add tests (#2417)
* y2038 addon: Fix that check can never return True, add tests

At the beginning of `check_y2038_safe()` the variable `y2038safe` should
be initialized with `True` and only be set to `False` if there are any
issues. Otherwise it could never become `True`.
In the unit tests the return value of `check_y2038_safe()` is now
verified. But it does not yet work for the "good" example. The "good"
example also returns `False` since it finds warnings in the include
file. So this verification is marked with a "FIXME" comment.

* y2038 tests: Add "good" test file that does not use time functionality

The test file y2038-test-5-good-no-time-used.c does not use any time
functionality so the y2038 addon is not allowed to issue any warnings
and the check must return with `True` (code is safe).
2019-12-03 18:49:11 +01:00
..
y2038-inc.h Update addons structure. Make Y2038 addon works. (#2024) 2019-07-26 06:38:03 +02:00
y2038-test-1-bad-time-bits.c Update addons structure. Make Y2038 addon works. (#2024) 2019-07-26 06:38:03 +02:00
y2038-test-2-no-time-bits.c Update addons structure. Make Y2038 addon works. (#2024) 2019-07-26 06:38:03 +02:00
y2038-test-3-no-use-time-bits.c Update addons structure. Make Y2038 addon works. (#2024) 2019-07-26 06:38:03 +02:00
y2038-test-4-good.c Update addons structure. Make Y2038 addon works. (#2024) 2019-07-26 06:38:03 +02:00
y2038-test-5-good-no-time-used.c y2038 addon: Fix that check can never return True, add tests (#2417) 2019-12-03 18:49:11 +01:00