Git fork

trace2: avoid "futile conditional"

CodeQL reports empty `if` blocks that only contain a comment as "futile
conditional". The comment talks about potential plans to turn this into
a warning, but that seems not to have been necessary. Replace the entire
construct with a concise comment.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Johannes Schindelin and committed by
Junio C Hamano
fc451e6e 3d39bcd9

+5 -19
+5 -19
trace2/tr2_tmr.c
··· 102 102 struct tr2_timer *t_final = &final_timer_block.timer[tid]; 103 103 struct tr2_timer *t = &ctx->timer_block.timer[tid]; 104 104 105 - if (t->recursion_count) { 106 - /* 107 - * The current thread is exiting with 108 - * timer[tid] still running. 109 - * 110 - * Technically, this is a bug, but I'm going 111 - * to ignore it. 112 - * 113 - * I don't think it is worth calling die() 114 - * for. I don't think it is worth killing the 115 - * process for this bookkeeping error. We 116 - * might want to call warning(), but I'm going 117 - * to wait on that. 118 - * 119 - * The downside here is that total_ns won't 120 - * include the current open interval (now - 121 - * start_ns). I can live with that. 122 - */ 123 - } 105 + /* 106 + * `t->recursion_count` could technically be non-zero, which 107 + * would constitute a bug. Reporting the bug would potentially 108 + * cause an infinite recursion, though, so let's ignore it. 109 + */ 124 110 125 111 if (!t->interval_count) 126 112 continue; /* this timer was not used by this thread */