diff --git a/cgdoom/am_map.c b/cgdoom/am_map.c index 497a823..f180d21 100644 --- a/cgdoom/am_map.c +++ b/cgdoom/am_map.c @@ -991,17 +991,12 @@ AM_drawFline register int ay; register int d; - static int fuck = 0; - // For debugging only - if ( fl->a.x < 0 || fl->a.x >= f_w + if ( fl->a.x < 0 || fl->a.x >= f_w || fl->a.y < 0 || fl->a.y >= f_h || fl->b.x < 0 || fl->b.x >= f_w || fl->b.y < 0 || fl->b.y >= f_h) { -#ifdef CG_EMULATOR - printf("fuck %d \r", fuck++); -#endif //#ifdef CG_EMULATOR return; } diff --git a/cgdoom/cgdoom.c b/cgdoom/cgdoom.c index d88fa3b..002336b 100644 --- a/cgdoom/cgdoom.c +++ b/cgdoom/cgdoom.c @@ -530,10 +530,14 @@ int CreateFileMapping(int fd, FileMapping *pMap) pFileData = ReadNextSector(&fc, &iLength); if(iLength <= 0) break; + + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstringop-overread" if((iLength == FLASH_PAGE_SIZE) ? CGD_sector_memcmp(pFileData, pFragment, iLength) : memcmp(pFileData, pFragment, iLength)) break; + #pragma GCC diagnostic pop } } if(iLength < 0) diff --git a/cgdoom/m_swap.c b/cgdoom/m_swap.c index 68d9219..eb7a18b 100644 --- a/cgdoom/m_swap.c +++ b/cgdoom/m_swap.c @@ -29,7 +29,7 @@ #endif #include "m_swap.h" -#ifndef CG_EMULATOR +#if !defined(CG_EMULATOR) && !defined(__BIG_ENDIAN__) #define __BIG_ENDIAN__ #endif diff --git a/cgdoom/p_spec.c b/cgdoom/p_spec.c index e9b1df1..cf439ca 100644 --- a/cgdoom/p_spec.c +++ b/cgdoom/p_spec.c @@ -1150,7 +1150,7 @@ int EV_DoDonut(line_t* line) s2 = getNextSector(s1->lines[0],s1); for (i = 0;i < s2->linecount;i++) { - if ( (!s2->lines[i]->flags & ML_TWOSIDED) || (s2->lines[i]->backsector == s1) ) + if ( (!(s2->lines[i]->flags & ML_TWOSIDED)) || (s2->lines[i]->backsector == s1) ) continue; s3 = s2->lines[i]->backsector;