fix sprintf type

This commit is contained in:
hongruichen 2024-07-10 19:48:57 +08:00
parent 3feb574bf0
commit b49b501e26

View file

@ -33,7 +33,7 @@ public:
if (_tensor_name.empty()) {
static std::atomic_uint32_t unnamed_tensor_count = 0;
char buffer[GGML_MAX_NAME] = {};
snprintf(buffer, sizeof(buffer), "unnamed_%p", unnamed_tensor_count++);
snprintf(buffer, sizeof(buffer), "unnamed_%d", (int)(unnamed_tensor_count++));
_tensor_name = buffer;
}