tools: explicitly cast to avoid a warning