mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-01-03 15:58:39 +00:00
Do it by adding @end tag. Without it the allocated memory has no space for 'name'. Also fix SpiceMsgMainArrayMessage tests/test-marshallers.h, replacing int8_t* name with int8_t name[0]. This makes name an "in-structure" array with no pre-defined size instead of a pointer. The size is defined by the message size. Signed-off-by: Uri Lublin <uril@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
32 lines
591 B
C
32 lines
591 B
C
#ifndef H_SPICE_COMMON_TEST_MARSHALLERS
|
|
#define H_SPICE_COMMON_TEST_MARSHALLERS
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef struct {
|
|
uint32_t data_size;
|
|
uint8_t dummy_byte;
|
|
uint64_t *data;
|
|
} SpiceMsgMainShortDataSubMarshall;
|
|
|
|
typedef struct {
|
|
int8_t name[0];
|
|
} SpiceMsgMainArrayMessage;
|
|
|
|
typedef struct {
|
|
uint16_t n;
|
|
} SpiceMsgMainZeroes;
|
|
|
|
typedef struct SpiceMsgChannels {
|
|
uint32_t num_of_channels;
|
|
uint16_t channels[0];
|
|
} SpiceMsgChannels;
|
|
|
|
typedef struct {
|
|
uint32_t dummy[2];
|
|
uint8_t data[0];
|
|
} SpiceMsgMainLenMessage;
|
|
|
|
#endif /* H_SPICE_COMMON_TEST_MARSHALLERS */
|
|
|