1. 16 Feb, 2018 1 commit
    • Explicitly mark fallthrough cases with comments · 06b8a40f
      A lot of compilers nowadays generate warnings when there are cases in a
      switch statement which implicitly fall through to the next case. To
      avoid this warning, the last line in the case that is falling through
      can have a comment matching a regular expression, where one possible
      comment body would be `/* fall through */`.
      
      An alternative to the comment would be an explicit attribute like e.g.
      `[[clang::fallthrough]` or `__attribute__ ((fallthrough))`. But GCC only
      introduced support for such an attribute recently with GCC 7. Thus, and
      also because the fallthrough comment is supported by most compilers, we
      settle for using comments instead.
      
      One shortcoming of that method is that compilers are very strict about
      that. Most interestingly, that comment _really_ has to be the last line.
      In case a closing brace follows the comment, the heuristic will fail.
      Patrick Steinhardt committed
  2. 03 Jul, 2017 1 commit
    • Make sure to always include "common.h" first · 0c7f49dd
      Next to including several files, our "common.h" header also declares
      various macros which are then used throughout the project. As such, we
      have to make sure to always include this file first in all
      implementation files. Otherwise, we might encounter problems or even
      silent behavioural differences due to macros or defines not being
      defined as they should be. So in fact, our header and implementation
      files should make sure to always include "common.h" first.
      
      This commit does so by establishing a common include pattern. Header
      files inside of "src" will now always include "common.h" as its first
      other file, separated by a newline from all the other includes to make
      it stand out as special. There are two cases for the implementation
      files. If they do have a matching header file, they will always include
      this one first, leading to "common.h" being transitively included as
      first file. If they do not have a matching header file, they instead
      include "common.h" as first file themselves.
      
      This fixes the outlined problems and will become our standard practice
      for header and source files inside of the "src/" from now on.
      Patrick Steinhardt committed
  3. 05 May, 2017 1 commit
  4. 29 Dec, 2016 1 commit
  5. 06 Oct, 2016 1 commit
  6. 05 Sep, 2014 1 commit
  7. 05 Feb, 2014 1 commit
  8. 20 Jan, 2014 1 commit
  9. 02 Oct, 2013 1 commit
  10. 11 Sep, 2013 1 commit
  11. 07 Sep, 2013 2 commits
  12. 19 Aug, 2013 1 commit
  13. 15 Aug, 2013 2 commits
  14. 13 Jul, 2013 1 commit
  15. 12 Jun, 2013 1 commit
  16. 16 May, 2013 3 commits
  17. 15 May, 2013 1 commit
  18. 07 May, 2013 1 commit
  19. 01 May, 2013 1 commit
  20. 18 Apr, 2013 1 commit
  21. 15 Apr, 2013 4 commits
  22. 10 Apr, 2013 1 commit
  23. 09 Apr, 2013 1 commit
  24. 08 Apr, 2013 1 commit
  25. 07 Apr, 2013 1 commit
  26. 30 Mar, 2013 1 commit
  27. 17 Mar, 2013 1 commit
  28. 07 Mar, 2013 1 commit
  29. 03 Feb, 2013 2 commits
  30. 08 Jan, 2013 1 commit
  31. 01 Dec, 2012 1 commit
  32. 27 Nov, 2012 1 commit