mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 12:01:05 +00:00
Suppress libdivide warnings in GCC/Clang
This commit is contained in:
parent
eb1492fe6e
commit
05f1a9a2c8
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
|
////////// 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) {
|
static inline struct libdivide_u32_t libdivide_internal_u32_gen(uint32_t d, int branchfree) {
|
||||||
struct libdivide_u32_t result;
|
struct libdivide_u32_t result;
|
||||||
uint32_t floor_log_2_d;
|
uint32_t floor_log_2_d;
|
||||||
|
@ -647,6 +652,10 @@ struct libdivide_u32_t libdivide_u32_gen(uint32_t d) {
|
||||||
return ret;
|
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) {
|
uint32_t libdivide_u32_do(uint32_t numer, const struct libdivide_u32_t *denom) {
|
||||||
uint8_t more = denom->more;
|
uint8_t more = denom->more;
|
||||||
if (!denom->magic) {
|
if (!denom->magic) {
|
||||||
|
|
|
@ -18,6 +18,11 @@
|
||||||
#define SPANSIZE 16
|
#define SPANSIZE 16
|
||||||
#define INVSPAN 0.0625f
|
#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
|
/** \brief The R_DrawSpan_NPO2_8 function
|
||||||
Draws the actual span.
|
Draws the actual span.
|
||||||
*/
|
*/
|
||||||
|
@ -1572,3 +1577,7 @@ void R_DrawTiltedWaterSpan_NPO2_8(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__GNUC__) || defined(__clang__) // Stop suppressing intentional libdivide compiler warnings
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue