0001-Add-a-comment-for-fallthrough.patch 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From e67bb3debe582f0e77770b714bd012bb1082fc41 Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Wed, 19 Apr 2017 11:32:00 -0700
  4. Subject: [PATCH] Add a comment for fallthrough
  5. Fixes warnings with gcc7 e.g.
  6. ../../../../../../../workspace/sources/pax/src/options.c: In function 'tar_options':
  7. ../../../../../../../workspace/sources/pax/src/options.c:725:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
  8. if (opt_add ("write_opt=nodir") < 0)
  9. ^
  10. ../../../../../../../workspace/sources/pax/src/options.c:730:2: note: here
  11. case 'O':
  12. ^~~~
  13. cc1: all warnings being treated as errors
  14. Upstream-Status: Pending
  15. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  16. ---
  17. src/options.c | 1 +
  18. 1 file changed, 1 insertion(+)
  19. diff --git a/src/options.c b/src/options.c
  20. index c663b4e..b80819a 100644
  21. --- a/src/options.c
  22. +++ b/src/options.c
  23. @@ -724,6 +724,7 @@ tar_options (int argc, char **argv)
  24. case 'o':
  25. if (opt_add ("write_opt=nodir") < 0)
  26. tar_usage ();
  27. + /* fallthru */
  28. case 'O':
  29. Oflag = 1;
  30. break;
  31. --
  32. 2.12.2