0001-fc_sort-avoid-compiler-warning-error.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 89b53fafa9904ba7a3df2ad94d01a485eae5366f Mon Sep 17 00:00:00 2001
  2. From: Guido Trentalancia <guido@trentalancia.net>
  3. Date: Tue, 6 Jun 2017 00:08:13 +0200
  4. Subject: [PATCH] fc_sort: avoid compiler warning/error
  5. Fix a "-Werror=implicit-fallthrough" compiler warning/error on
  6. the switch statement.
  7. This third version (v3) fixes a bug introduced in the first
  8. version and improves the style over the second version.
  9. Signed-off-by: Guido Trentalancia <guido at trentalancia.com>
  10. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
  11. ---
  12. support/fc_sort.c | 10 ++++++----
  13. 1 file changed, 6 insertions(+), 4 deletions(-)
  14. diff --git a/support/fc_sort.c b/support/fc_sort.c
  15. index 5561288a..66cdf39f 100644
  16. --- a/support/fc_sort.c
  17. +++ b/support/fc_sort.c
  18. @@ -292,14 +292,16 @@ void fc_fill_data(file_context_node_t *fc_node)
  19. /* If a escape character is found,
  20. * skip the next character. */
  21. c++;
  22. + break;
  23. default:
  24. - /* If no meta character has been found yet,
  25. - * add one to the stem length. */
  26. - if (!fc_node->meta)
  27. - fc_node->stem_len++;
  28. break;
  29. }
  30. + /* If no meta character has been found yet,
  31. + * add one to the stem length. */
  32. + if (!fc_node->meta)
  33. + fc_node->stem_len++;
  34. +
  35. fc_node->str_len++;
  36. c++;
  37. }
  38. --
  39. 2.11.0