From: Paul Brossier Date: Tue, 29 Jan 2019 02:31:38 +0000 (+0100) Subject: [tensor] add warning in aubio_tensor_as_fmat, to be avoided X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=d9a54660def532e7968b7737427f09d47f41a0cb;p=aubio.git [tensor] add warning in aubio_tensor_as_fmat, to be avoided --- diff --git a/src/ai/tensor.c b/src/ai/tensor.c index 976706a0..a15818e9 100644 --- a/src/ai/tensor.c +++ b/src/ai/tensor.c @@ -93,6 +93,8 @@ uint_t aubio_tensor_as_fmat(aubio_tensor_t *c, fmat_t *o) { o->height = c->shape[0]; o->length = c->size / c->shape[0]; o->data = c->data; + // o was allocated on the stack, data[1] may be NULL + AUBIO_WRN("aubio_tensor_as_fmat will not create a usable table of rows\n"); return AUBIO_OK; }