to_float(ctx, src0),
};
- sprintf(name, "%s.f%d", intrin, get_elem_bits(ctx, result_type));
+ MAYBE_UNUSED const int length = snprintf(name, sizeof(name), "%s.f%d", intrin,
+ get_elem_bits(ctx, result_type));
+ assert(length < sizeof(name));
return ac_build_intrinsic(ctx, name, result_type, params, 1, AC_FUNC_ATTR_READNONE);
}
to_float(ctx, src1),
};
- sprintf(name, "%s.f%d", intrin, get_elem_bits(ctx, result_type));
+ MAYBE_UNUSED const int length = snprintf(name, sizeof(name), "%s.f%d", intrin,
+ get_elem_bits(ctx, result_type));
+ assert(length < sizeof(name));
return ac_build_intrinsic(ctx, name, result_type, params, 2, AC_FUNC_ATTR_READNONE);
}
to_float(ctx, src2),
};
- sprintf(name, "%s.f%d", intrin, get_elem_bits(ctx, result_type));
+ MAYBE_UNUSED const int length = snprintf(name, sizeof(name), "%s.f%d", intrin,
+ get_elem_bits(ctx, result_type));
+ assert(length < sizeof(name));
return ac_build_intrinsic(ctx, name, result_type, params, 3, AC_FUNC_ATTR_READNONE);
}
build_int_type_name(LLVMTypeOf(coords),
coords_type, sizeof(coords_type));
- snprintf(intrinsic_name, sizeof(intrinsic_name),
- "%s.%s.%s", base_name, atomic_name, coords_type);
+ MAYBE_UNUSED const int length = snprintf(intrinsic_name, sizeof(intrinsic_name),
+ "%s.%s.%s", base_name, atomic_name, coords_type);
+ assert(length < sizeof(intrinsic_name));
return ac_build_intrinsic(&ctx->ac, intrinsic_name, ctx->i32, params, param_count, 0);
}