mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Merge branch 'suppress-warnings' into 'master'
Suppress libdivide warnings in GCC/Clang See merge request STJr/SRB2!1991
This commit is contained in:
commit
c29999aea7
2 changed files with 18 additions and 0 deletions
|
@ -581,6 +581,11 @@ static inline void libdivide_u128_shift(uint64_t *u1, uint64_t *u0, int32_t sign
|
|||
|
||||
////////// UINT32
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__) // Suppress intentional compiler warnings
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Waggregate-return"
|
||||
#endif
|
||||
|
||||
static inline struct libdivide_u32_t libdivide_internal_u32_gen(uint32_t d, int branchfree) {
|
||||
struct libdivide_u32_t result;
|
||||
uint32_t floor_log_2_d;
|
||||
|
@ -647,6 +652,10 @@ struct libdivide_u32_t libdivide_u32_gen(uint32_t d) {
|
|||
return ret;
|
||||
}*/
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__) // Stop suppressing intentional compiler warnings
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
uint32_t libdivide_u32_do(uint32_t numer, const struct libdivide_u32_t *denom) {
|
||||
uint8_t more = denom->more;
|
||||
if (!denom->magic) {
|
||||
|
|
|
@ -18,6 +18,11 @@
|
|||
#define SPANSIZE 16
|
||||
#define INVSPAN 0.0625f
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__) // Suppress intentional libdivide compiler warnings - Also added to libdivide.h
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Waggregate-return"
|
||||
#endif
|
||||
|
||||
/** \brief The R_DrawSpan_NPO2_8 function
|
||||
Draws the actual span.
|
||||
*/
|
||||
|
@ -1572,3 +1577,7 @@ void R_DrawTiltedWaterSpan_NPO2_8(void)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__) // Stop suppressing intentional libdivide compiler warnings
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue