1. 06 May, 2020 3 commits
    • Nick Mathewson's avatar
      Use __attribute__((fallthrough)) rather than magic GCC comments. · 28ac17f4
      Nick Mathewson authored
      GCC added an implicit-fallthrough warning a while back, where it
      would complain if you had a nontrivial "case:" block that didn't end
      with break, return, or something like that.  Clang recently added
      the same thing.
      
      GCC, however, would let you annotate a fall-through as intended by
      any of various magic "/* fall through */" comments.  Clang, however,
      only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
      accepts that too.
      
      A previous commit in this branch defined a FALLTHROUGH macro to do
      the right thing if GNUC is defined; here we replace all of our "fall
      through" comments with uses of that macro.
      
      This is an automated commit, made with the following perl one-liner:
      
        #!/usr/bin/perl -i -p
        s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;
      
      (In order to avoid conflicts, I'm applying this script separately to
      each maint branch. This is the 0.4.2 version.)
      28ac17f4
    • Nick Mathewson's avatar
      Use __attribute__((fallthrough)) rather than magic GCC comments. · 79ff2b6a
      Nick Mathewson authored
      GCC added an implicit-fallthrough warning a while back, where it
      would complain if you had a nontrivial "case:" block that didn't end
      with break, return, or something like that.  Clang recently added
      the same thing.
      
      GCC, however, would let you annotate a fall-through as intended by
      any of various magic "/* fall through */" comments.  Clang, however,
      only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
      accepts that too.
      
      A previous commit in this branch defined a FALLTHROUGH macro to do
      the right thing if GNUC is defined; here we replace all of our "fall
      through" comments with uses of that macro.
      
      This is an automated commit, made with the following perl one-liner:
      
        #!/usr/bin/perl -i -p
        s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;
      
      (In order to avoid conflicts, I'm applying this script separately to
      each maint branch. This is the 0.4.1 version.)
      79ff2b6a
    • Nick Mathewson's avatar
      Use __attribute__((fallthrough)) rather than magic GCC comments. · cc397449
      Nick Mathewson authored
      GCC added an implicit-fallthrough warning a while back, where it
      would complain if you had a nontrivial "case:" block that didn't end
      with break, return, or something like that.  Clang recently added
      the same thing.
      
      GCC, however, would let you annotate a fall-through as intended by
      any of various magic "/* fall through */" comments.  Clang, however,
      only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
      accepts that too.
      
      A previous commit in this branch defined a FALLTHROUGH macro to do
      the right thing if GNUC is defined; here we replace all of our "fall
      through" comments with uses of that macro.
      
      This is an automated commit, made with the following perl one-liner:
      
        #!/usr/bin/perl -i -p
        s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;
      cc397449
  2. 28 Jun, 2019 1 commit
    • Nick Mathewson's avatar
      Coverity: different implementation for csiphash · f55598f8
      Nick Mathewson authored
      Coverity has had trouble figuring out our csiphash implementation,
      and has given spurious warnings about its behavior.
      
      This patch changes the csiphash implementation when coverity is in
      use, so that coverity can figure out that we are not about to read
      beyond the provided input.
      
      Closes ticket 31025.
      f55598f8
  3. 14 Nov, 2018 1 commit
  4. 29 Jun, 2018 1 commit
  5. 21 Jun, 2018 1 commit
  6. 20 Jun, 2018 1 commit
  7. 11 Jan, 2018 1 commit
  8. 11 Sep, 2017 1 commit
  9. 30 May, 2017 1 commit
  10. 14 Mar, 2017 1 commit
  11. 03 Feb, 2017 1 commit
  12. 05 Nov, 2015 1 commit
  13. 23 Mar, 2015 1 commit
    • Yawning Angel's avatar
      Fix unaligned access in SipHash-2-4. · 732f522a
      Yawning Angel authored and Nick Mathewson's avatar Nick Mathewson committed
      The compiler is allowed to assume that a "uint64_t *" is aligned
      correctly, and will inline a version of memcpy that acts as such.
      
      Use "uint8_t *", so the compiler does the right thing.
      732f522a
  14. 28 Oct, 2014 1 commit
  15. 07 Apr, 2014 1 commit
  16. 18 Mar, 2014 1 commit
    • Nick Mathewson's avatar
      csiphash: don't attempt unaligned access · aaa33f14
      Nick Mathewson authored
      In digestmap_set/get benchmarks, doing unaligned access on x86
      doesn't save more than a percent or so in the fast case.  In the
      slow case (where we cross a cache line), it could be pretty
      expensive.  It also makes ubsan unhappy.
      aaa33f14
  17. 17 Feb, 2014 1 commit
  18. 12 Feb, 2014 5 commits