diff options
| author | Ha Thach <[email protected]> | 2020-05-18 13:21:37 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-05-18 13:21:37 +0700 |
| commit | 76bf96bcb0c12ba241ee4ecc175afb257e550d19 (patch) | |
| tree | 6be8654ae1d2fd78e257783b2535455df2597d9c /src/common | |
| parent | 17869f0999d275ec6a8830c95999998f0f84fd03 (diff) | |
| parent | 550746097b81c07cdc2459371c809a3678fe1ff4 (diff) | |
Merge pull request #411 from hathach/fix-cast-align-warning
enable -Wcast-align
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/tusb_common.h b/src/common/tusb_common.h index 2389bfcd4..f144cda73 100644 --- a/src/common/tusb_common.h +++ b/src/common/tusb_common.h @@ -106,7 +106,7 @@ static inline uint16_t tu_max16 (uint16_t x, uint16_t y) { return (x > y) ? x : static inline uint32_t tu_max32 (uint32_t x, uint32_t y) { return (x > y) ? x : y; } // Align -static inline uint32_t tu_align_n(uint32_t value, uint32_t alignment) +static inline uint32_t tu_align(uint32_t value, uint32_t alignment) { return value & ((uint32_t) ~(alignment-1)); } |
