diff --git a/src/util-profiling-keywords.c b/src/util-profiling-keywords.c index 3aba66c094..1e55980df7 100644 --- a/src/util-profiling-keywords.c +++ b/src/util-profiling-keywords.c @@ -126,12 +126,12 @@ static void DoDump(SCProfileKeywordDetectCtx *rules_ctx, FILE *fp, const char *n double avgticks_match = 0; double avgticks_no_match = 0; if (ticks && d->checks) { - avgticks = (ticks / d->checks); + avgticks = (double)(ticks / d->checks); if (d->ticks_match && d->matches) - avgticks_match = (d->ticks_match / d->matches); + avgticks_match = (double)(d->ticks_match / d->matches); if (d->ticks_no_match && (d->checks - d->matches) != 0) - avgticks_no_match = (d->ticks_no_match / (d->checks - d->matches)); + avgticks_no_match = (double)(d->ticks_no_match / (d->checks - d->matches)); } fprintf(fp, diff --git a/src/util-profiling-prefilter.c b/src/util-profiling-prefilter.c index 1831a5dd52..3005517ffa 100644 --- a/src/util-profiling-prefilter.c +++ b/src/util-profiling-prefilter.c @@ -115,7 +115,7 @@ static void DoDump(SCProfilePrefilterDetectCtx *rules_ctx, FILE *fp, const char uint64_t ticks = d->total; double avgticks = 0; if (ticks && d->called) { - avgticks = (ticks / d->called); + avgticks = (double)(ticks / d->called); } fprintf(fp,