Fix type-limits warnings, uint can't be < 0
[babeltrace.git] / plugins / text / pretty / print.c
index 0d69b9bcd1f9018869330f85aaddd29d87b90060..5e63deb0bca15d9145a249bc1514231be58de3c3 100644 (file)
@@ -416,7 +416,7 @@ int print_event_header(struct pretty_component *pretty,
                        } else if (dom_print) {
                                g_string_append(pretty->string, ":");
                        }
-                       value = bt_value_integer_get(vpid_value);
+                       value = bt_value_signed_integer_get(vpid_value);
                        g_string_append_printf(pretty->string,
                                "(%" PRId64 ")", value);
                        dom_print = 1;
@@ -822,11 +822,9 @@ int print_struct(struct pretty_component *pretty,
                ret = -1;
                goto end;
        }
+
        nr_fields = bt_field_class_structure_get_member_count(struct_class);
-       if (nr_fields < 0) {
-               ret = -1;
-               goto end;
-       }
+
        g_string_append(pretty->string, "{");
        pretty->depth++;
        nr_printed_fields = 0;
@@ -924,11 +922,6 @@ int print_sequence(struct pretty_component *pretty,
        uint64_t i;
 
        len = bt_field_array_get_length(seq);
-       if (len < 0) {
-               ret = -1;
-               goto end;
-       }
-
        g_string_append(pretty->string, "[");
 
        pretty->depth++;
This page took 0.023575 seconds and 4 git commands to generate.