Commit b989eb1c authored by Matthieu Schaller's avatar Matthieu Schaller

Fix 'unused variable' warning in testCbrt.c

parent 5dc33287
......@@ -50,8 +50,9 @@ int main(int argc, char *argv[]) {
message("executing %i runs of each command.", num_vals);
/* Create and fill an array of floats. */
float *data;
posix_memalign((void **)&data, 64, num_vals * sizeof(float));
float *data = NULL;
if (posix_memalign((void **)&data, 64, num_vals * sizeof(float)) != 0)
error("Failed to allocted memory for the test");
for (int k = 0; k < num_vals; k++) {
data[k] = (float)rand() / RAND_MAX;
data[k] = (1.0f - data[k]) * range_min + data[k] * range_max;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment