diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2025-08-23 11:01:57 +0200 |
---|---|---|
committer | Dimitri Staessens <dimitri@ouroboros.rocks> | 2025-08-23 14:11:39 +0200 |
commit | 6292bbbd245cb64a346f5126670085e656e89a88 (patch) | |
tree | 077b7132ad487b4fc40637093d8b29997faae6d0 /src/lib | |
parent | 047f4ed6c188de4e874895a6818c09f2460322bd (diff) | |
download | ouroboros-6292bbbd245cb64a346f5126670085e656e89a88.tar.gz ouroboros-6292bbbd245cb64a346f5126670085e656e89a88.zip |
build: Add some hints for scan-build
The scan-build tool was pointing out some potential issues that were
understood or false positives. Added some asserts so scan-build can
complete successfully without these warnings.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/tpm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/tpm.c b/src/lib/tpm.c index 52c28de7..7a17ef6b 100644 --- a/src/lib/tpm.c +++ b/src/lib/tpm.c @@ -95,6 +95,9 @@ static void tpm_debug_thread(struct pthr_el * e) diff = ts_diff_ms(&now, &e->start) / 1000; intv = ts_diff_ms(&now, &e->last) / 1000; + (void) diff; /* Never read if both build options off (0) */ + (void) intv; /* Never read if report option off (0) */ + if (BETWEEN(TPM_DEBUG_REPORT_INTERVAL, 0, intv)) { log_dbg("Thread %d:%lx running for %ld s.\n", getpid(),e->thr, diff); |