Fix g++ build
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 9 Nov 2022 01:38:20 +0000 (20:38 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 9 Nov 2022 01:38:20 +0000 (20:38 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/side/trace.h
src/test.c
src/tracer.c

index 4284d8c9311f1be8f3dde7956a44c34aace5872c..d7c3d98be6497890fb99b0a67120aa17a7549dc1 100644 (file)
@@ -1181,6 +1181,7 @@ struct side_event_description {
                        .side_gather = { \
                                .u = { \
                                        .side_vla = { \
+                                               .length_type = _length_type_gather, \
                                                .offset = _offset, \
                                                .access_mode = _access_mode, \
                                                .type = { \
@@ -1188,7 +1189,6 @@ struct side_event_description {
                                                        .attr = _attr, \
                                                        .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
                                                }, \
-                                               .length_type = _length_type_gather, \
                                        }, \
                                }, \
                        }, \
@@ -1209,7 +1209,7 @@ struct side_event_description {
 /* Stack-copy field arguments */
 
 #define side_arg_null(_val)            { .type = SIDE_TYPE_NULL }
-#define side_arg_bool(_val)            { .type = SIDE_TYPE_BOOL, .u = { .side_static = { .bool_value.side_bool8 = !!(_val) } } }
+#define side_arg_bool(_val)            { .type = SIDE_TYPE_BOOL, .u = { .side_static = { .bool_value = { .side_bool8 = !!(_val) } } } }
 #define side_arg_byte(_val)            { .type = SIDE_TYPE_BYTE, .u = { .side_static = { .byte_value = (_val) } } }
 #define side_arg_string(_val)          { .type = SIDE_TYPE_STRING, .u = { .side_static = { .string_value = (uintptr_t) (_val) } } }
 
index 1f2bea4864efc68a88e317abee1772fee3105b2c..c395aef7bc0bf4bc1957463cc49afaed12cde95f 100644 (file)
@@ -1919,7 +1919,8 @@ static
 void test_gather_vla_flex(void)
 {
        side_event_cond(my_provider_event_gathervlaflex) {
-               struct testgathervlaflex *mystruct = malloc(sizeof(*mystruct) + VLAFLEXLEN + sizeof(uint64_t));
+               struct testgathervlaflex *mystruct =
+                       (struct testgathervlaflex *) malloc(sizeof(*mystruct) + VLAFLEXLEN + sizeof(uint64_t));
 
                mystruct->len = VLAFLEXLEN;
                mystruct->otherfield = 0;
index 80867b8531bb1486cd8ba5d6cd70e29e42b26d1a..62225e411ed370413d55b881d91be893bb5d103d 100644 (file)
@@ -1062,7 +1062,8 @@ uint32_t tracer_gather_size(enum side_type_gather_access_mode access_mode, uint3
 static
 uint64_t tracer_load_gather_integer_type(const struct side_type_gather *type_gather, const void *_ptr)
 {
-       enum side_type_gather_access_mode access_mode = type_gather->u.side_integer.access_mode;
+       enum side_type_gather_access_mode access_mode =
+               (enum side_type_gather_access_mode) type_gather->u.side_integer.access_mode;
        uint32_t integer_size_bytes = type_gather->u.side_integer.type.integer_size;
        const char *ptr = (const char *) _ptr;
        union side_integer_value value;
@@ -1086,7 +1087,8 @@ uint64_t tracer_load_gather_integer_type(const struct side_type_gather *type_gat
 static
 uint32_t tracer_print_gather_bool_type(const struct side_type_gather *type_gather, const void *_ptr)
 {
-       enum side_type_gather_access_mode access_mode = type_gather->u.side_bool.access_mode;
+       enum side_type_gather_access_mode access_mode =
+               (enum side_type_gather_access_mode) type_gather->u.side_bool.access_mode;
        uint32_t bool_size_bytes = type_gather->u.side_bool.type.bool_size;
        const char *ptr = (const char *) _ptr;
        union side_bool_value value;
@@ -1110,7 +1112,8 @@ uint32_t tracer_print_gather_bool_type(const struct side_type_gather *type_gathe
 static
 uint32_t tracer_print_gather_byte_type(const struct side_type_gather *type_gather, const void *_ptr)
 {
-       enum side_type_gather_access_mode access_mode = type_gather->u.side_byte.access_mode;
+       enum side_type_gather_access_mode access_mode =
+               (enum side_type_gather_access_mode) type_gather->u.side_byte.access_mode;
        const char *ptr = (const char *) _ptr;
        uint8_t value;
 
@@ -1126,7 +1129,8 @@ static
 uint32_t tracer_print_gather_integer_type(const struct side_type_gather *type_gather, const void *_ptr,
                enum tracer_display_base default_base)
 {
-       enum side_type_gather_access_mode access_mode = type_gather->u.side_integer.access_mode;
+       enum side_type_gather_access_mode access_mode =
+               (enum side_type_gather_access_mode) type_gather->u.side_integer.access_mode;
        uint32_t integer_size_bytes = type_gather->u.side_integer.type.integer_size;
        const char *ptr = (const char *) _ptr;
        union side_integer_value value;
@@ -1150,7 +1154,8 @@ uint32_t tracer_print_gather_integer_type(const struct side_type_gather *type_ga
 static
 uint32_t tracer_print_gather_float_type(const struct side_type_gather *type_gather, const void *_ptr)
 {
-       enum side_type_gather_access_mode access_mode = type_gather->u.side_float.access_mode;
+       enum side_type_gather_access_mode access_mode =
+               (enum side_type_gather_access_mode) type_gather->u.side_float.access_mode;
        uint32_t float_size_bytes = type_gather->u.side_float.type.float_size;
        const char *ptr = (const char *) _ptr;
        union side_float_value value;
@@ -1221,7 +1226,8 @@ void tracer_print_gather_field(const struct side_event_field *field, const void
 static
 uint32_t tracer_print_gather_struct(const struct side_type_gather *type_gather, const void *_ptr)
 {
-       enum side_type_gather_access_mode access_mode = type_gather->u.side_struct.access_mode;
+       enum side_type_gather_access_mode access_mode =
+               (enum side_type_gather_access_mode) type_gather->u.side_struct.access_mode;
        const char *ptr = (const char *) _ptr;
        uint32_t i;
 
@@ -1240,7 +1246,8 @@ uint32_t tracer_print_gather_struct(const struct side_type_gather *type_gather,
 static
 uint32_t tracer_print_gather_array(const struct side_type_gather *type_gather, const void *_ptr)
 {
-       enum side_type_gather_access_mode access_mode = type_gather->u.side_array.access_mode;
+       enum side_type_gather_access_mode access_mode =
+               (enum side_type_gather_access_mode) type_gather->u.side_array.access_mode;
        const char *ptr = (const char *) _ptr, *orig_ptr;
        uint32_t i;
 
@@ -1269,7 +1276,8 @@ static
 uint32_t tracer_print_gather_vla(const struct side_type_gather *type_gather, const void *_ptr,
                const void *_length_ptr)
 {
-       enum side_type_gather_access_mode access_mode = type_gather->u.side_vla.access_mode;
+       enum side_type_gather_access_mode access_mode =
+               (enum side_type_gather_access_mode) type_gather->u.side_vla.access_mode;
        const char *ptr = (const char *) _ptr, *orig_ptr;
        const char *length_ptr = (const char *) _length_ptr;
        uint32_t i, length;
This page took 0.02741 seconds and 4 git commands to generate.