purplemarshmallow / z64

Low level RDP plugin for zilmar spec N64 emulators
20 stars 8 forks source link

fixed all basic warnings #25

Closed cxd4 closed 8 years ago

cxd4 commented 8 years ago

All of the normal level warnings are fixed by these commits, specifically:

rdp-mess.cpp:29:0: warning: "rdram" redefined [enabled by default]
 #define rdram ((UINT32*)gfx.RDRAM)
 ^
In file included from rdp-mess.cpp:9:0:
Gfx #1.3.h:116:0: note: this is the location of the previous definition
 #define rdram ((uint32_t*)gfx.RDRAM)
 ^
rdp-mess.cpp:31:0: warning: "rsp_imem" redefined [enabled by default]
 #define rsp_imem ((UINT32*)gfx.IMEM)
 ^
In file included from rdp-mess.cpp:9:0:
Gfx #1.3.h:117:0: note: this is the location of the previous definition
 #define rsp_imem ((uint32_t*)gfx.IMEM)
 ^
rdp-mess.cpp:33:0: warning: "rsp_dmem" redefined [enabled by default]
 #define rsp_dmem ((UINT32*)gfx.DMEM)
 ^
In file included from rdp-mess.cpp:9:0:
Gfx #1.3.h:118:0: note: this is the location of the previous definition
 #define rsp_dmem ((uint32_t*)gfx.DMEM)
 ^
rdp-mess.cpp:37:0: warning: "vi_origin" redefined [enabled by default]
 #define vi_origin (*(UINT32*)gfx.VI_ORIGIN_REG)
 ^
In file included from rdp-mess.cpp:9:0:
Gfx #1.3.h:119:0: note: this is the location of the previous definition
 #define vi_origin (*(uint32_t*)gfx.VI_ORIGIN_REG)
 ^
rdp-mess.cpp:39:0: warning: "vi_width" redefined [enabled by default]
 #define vi_width (*(UINT32*)gfx.VI_WIDTH_REG)
 ^
In file included from rdp-mess.cpp:9:0:
Gfx #1.3.h:120:0: note: this is the location of the previous definition
 #define vi_width (*(uint32_t*)gfx.VI_WIDTH_REG)
 ^
rdp-mess.cpp:41:0: warning: "vi_control" redefined [enabled by default]
 #define vi_control (*(UINT32*)gfx.VI_STATUS_REG)
 ^
In file included from rdp-mess.cpp:9:0:
Gfx #1.3.h:121:0: note: this is the location of the previous definition
 #define vi_control (*(uint32_t*)gfx.VI_STATUS_REG)
 ^
rdp-mess.cpp:44:0: warning: "dp_start" redefined [enabled by default]
 #define dp_start (*(UINT32*)gfx.DPC_START_REG)
 ^
In file included from rdp-mess.cpp:9:0:
Gfx #1.3.h:123:0: note: this is the location of the previous definition
 #define dp_start (*(uint32_t*)gfx.DPC_START_REG)
 ^
rdp-mess.cpp:46:0: warning: "dp_end" redefined [enabled by default]
 #define dp_end (*(UINT32*)gfx.DPC_END_REG)
 ^
In file included from rdp-mess.cpp:9:0:
Gfx #1.3.h:124:0: note: this is the location of the previous definition
 #define dp_end (*(uint32_t*)gfx.DPC_END_REG)
 ^
rdp-mess.cpp:48:0: warning: "dp_current" redefined [enabled by default]
 #define dp_current (*(UINT32*)gfx.DPC_CURRENT_REG)
 ^
In file included from rdp-mess.cpp:9:0:
Gfx #1.3.h:125:0: note: this is the location of the previous definition
 #define dp_current (*(uint32_t*)gfx.DPC_CURRENT_REG)
 ^
rdp-mess.cpp:50:0: warning: "dp_status" redefined [enabled by default]
 #define dp_status (*(UINT32*)gfx.DPC_STATUS_REG)
 ^
In file included from rdp-mess.cpp:9:0:
Gfx #1.3.h:126:0: note: this is the location of the previous definition
 #define dp_status (*(uint32_t*)gfx.DPC_STATUS_REG)
 ^
rdp-mess.cpp:1083:0: warning: "TEXTURE_PIPELINE" redefined [enabled by default]
 #define TEXTURE_PIPELINE(TEX, SSS, SST, NOBILINEAR)                     \
 ^
rdp-mess.cpp:1025:0: note: this is the location of the previous definition
 #define TEXTURE_PIPELINE(TEX, SSS, SST, NOBILINEAR)                     \
 ^

As I go on to make future pull requests, I will try to raise the warning level/compiler strictness in GCC to provoke it into complaining more and more about some of the code. With any luck this will help catch mistakes or typos in any z64 code.