-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
-Wuseless-cast
compiler warnings (#1145)
**Issue:** #973 This warning exists in GCC only (not Clang), and for C++ only (not C) **Description of changes:** - Add `-Wuseless-cast` warning to the "header checker" - Remove useless casts in `array_list.inl` - Ignore `-Wuseless-cast` warning in `math.inl` - The tricky part is that SOME platforms (Apple and BSD variants) define `size_t` as `unsigned long` and require casting to `uint64_t` (aka `unsigned long long`). While other platforms define `size_t` as `unsigned long long` and warn about useless casts if you cast it to `uint64_t`. My first commit attempted to only do casts on those platforms, but it was more complex than simply ignoring the warning.
- Loading branch information
Showing
3 changed files
with
28 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters