mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-30 09:46:50 +00:00
tests: Remove warning compiling
Remove:
test-display-streaming.c: In function 'get_commands':
test-display-streaming.c:218:42: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
218 | *commands = (Command*) calloc(sizeof(Command), *num_commands);
| ^~~~~~~
test-display-streaming.c:218:42: note: earlier argument should specify number of elements, later size of each element
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
This commit is contained in:
parent
4674667f0c
commit
b92149f2b9
@ -215,7 +215,7 @@ static void get_stream_commands(Command *commands, int num_commands,
|
||||
static void get_commands(Command **commands, int *num_commands)
|
||||
{
|
||||
*num_commands = NUM_COMMANDS * 2;
|
||||
*commands = (Command*) calloc(sizeof(Command), *num_commands);
|
||||
*commands = (Command*) calloc(*num_commands, sizeof(Command));
|
||||
|
||||
get_stream_commands(*commands, NUM_COMMANDS, create_frame1);
|
||||
get_stream_commands((*commands) + NUM_COMMANDS, NUM_COMMANDS, create_frame2);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user