0001-main-fix-typo.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. From ffa935dc881c394a824e063c8fde7dd102e06d8c Mon Sep 17 00:00:00 2001
  2. From: Romain Naour <romain.naour@gmail.com>
  3. Date: Fri, 8 May 2020 23:39:59 +0200
  4. Subject: [PATCH] main: fix typo
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. The function yaml_mapping_start_event_initialize()
  9. take yaml_mapping_style_t style as last argument:
  10. int yaml_mapping_start_event_initialize(
  11. yaml_event_t *event,
  12. const yaml_char_t *anchor,
  13. const yaml_char_t *tag,
  14. int implicit,
  15. yaml_mapping_style_t style)
  16. Use YAML_ANY_MAPPING_STYLE instead of YAML_ANY_SEQUENCE_STYLE
  17. Fixes:
  18. main.c:173:5: error: implicit conversion from ‘enum yaml_sequence_style_e’ to ‘yaml_mapping_style_t’ {aka ‘enum yaml_mapping_style_e’} [-Werror=enum-conversion]
  19. 173 | YAML_ANY_SEQUENCE_STYLE))
  20. | ^~~~~~~~~~~~~~~~~~~~~~~
  21. Signed-off-by: Romain Naour <romain.naour@gmail.com>
  22. ---
  23. main.c | 4 ++--
  24. 1 file changed, 2 insertions(+), 2 deletions(-)
  25. diff --git a/main.c b/main.c
  26. index 29a7c42..1685d3e 100644
  27. --- a/main.c
  28. +++ b/main.c
  29. @@ -170,7 +170,7 @@ static bool init_emitter(FILE *ts_file)
  30. /* Mapping start */
  31. if (!yaml_mapping_start_event_initialize(&event,
  32. NULL, NULL , YAML_IMPLICIT,
  33. - YAML_ANY_SEQUENCE_STYLE))
  34. + YAML_ANY_MAPPING_STYLE))
  35. ERROR_GOTO(emitter_delete,
  36. "Failed to initialize YAML mapping start event");
  37. if (!yaml_emitter_emit(&emitter, &event))
  38. @@ -263,7 +263,7 @@ static bool fill_timestamp(uint32_t core, uint64_t count, uint64_t addr,
  39. /* Mapping start */
  40. if (!yaml_mapping_start_event_initialize(&event,
  41. NULL, NULL , YAML_IMPLICIT,
  42. - YAML_ANY_SEQUENCE_STYLE))
  43. + YAML_ANY_MAPPING_STYLE))
  44. ERROR_RETURN_FALSE(
  45. "Failed to initialize YAML mapping start event");
  46. if (!yaml_emitter_emit(&emitter, &event))
  47. --
  48. 2.25.4