Fix warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]

git-svn-id: https://svn.eduke32.com/eduke32@6949 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2018-07-23 02:55:53 +00:00
parent a0c87b5fda
commit 104bdb131b
3 changed files with 5 additions and 4 deletions

View file

@ -306,8 +306,9 @@ void copybufreverse(const void *S, void *D, int32_t c);
static inline int32_t krecipasm(int32_t i)
{
// Ken did this
float const f = (float const)i;
i = *(int32_t const *)&f;
union { int32_t i; float f; } x;
x.f = (float)i;
i = x.i;
return ((reciptable[(i >> 12) & 2047] >> (((i - 0x3f800000) >> 23) & 31)) ^ (i >> 31));
}
#endif

View file

@ -308,7 +308,7 @@ SKIPWALLCHECK:
{
if (pOther->picnum == APLAYER)
{
DukePlayer_t *pPlayer = g_player[P_GetP((uspritetype * const)pOther)].ps;
DukePlayer_t *pPlayer = g_player[P_GetP((uspritetype *)pOther)].ps;
if (pPlayer->newowner >= 0)
G_ClearCameraView(pPlayer);

View file

@ -655,7 +655,7 @@ static void G_ReadGLFrame(void)
{
// Save OpenGL screenshot with Duke3D palette
// NOTE: maybe need to move this to the engine...
palette_t *const frame = (palette_t *const)Xcalloc(xdim * ydim, sizeof(palette_t));
palette_t *const frame = (palette_t *)Xcalloc(xdim * ydim, sizeof(palette_t));
char *const pic = (char *) waloff[TILE_SAVESHOT];
int32_t x, y;