Skip to content

Commit f3b2698

Browse files
authored
ggml : fix -Warray-bounds warning with gcc (#4231)
1 parent 3e73d31 commit f3b2698

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ggml.c

+6-5
Original file line numberDiff line numberDiff line change
@@ -15689,13 +15689,14 @@ static int ggml_get_n_tasks(struct ggml_tensor * node, int n_threads) {
1568915689
{
1569015690
n_tasks = 1;
1569115691
} break;
15692-
case GGML_OP_COUNT:
15693-
{
15694-
GGML_ASSERT(false);
15695-
} break;
1569615692
default:
1569715693
{
15698-
printf("%s: op %s not implemented\n", __func__, ggml_op_name(node->op));
15694+
fprintf(stderr, "%s: op not implemented: ", __func__);
15695+
if (node->op < GGML_OP_COUNT) {
15696+
fprintf(stderr, "%s\n", ggml_op_name(node->op));
15697+
} else {
15698+
fprintf(stderr, "%d\n", node->op);
15699+
}
1569915700
GGML_ASSERT(false);
1570015701
} break;
1570115702
}

0 commit comments

Comments
 (0)