0

Clean up some build warnings

Removed some unused code, and quelled some warnings via GCC
This commit is contained in:
Andrew Chin
2012-03-01 23:04:02 -05:00
parent c019d7e8d8
commit 20f9f92abd
4 changed files with 2 additions and 6 deletions

View File

@@ -105,7 +105,6 @@ cave_hidden(void *data, RenderState *state, int x, int y, int z) {
static int
cave_start(void *data, RenderState *state, PyObject *support) {
RenderPrimitiveCave* self;
int ret;
self = (RenderPrimitiveCave *)data;
if (!render_mode_parse_option(support, "only_lit", "i", &(self->only_lit)))

View File

@@ -26,11 +26,9 @@ typedef struct {
static void get_color(void *data, RenderState *state,
unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a) {
RenderPrimitiveSpawn* self = (RenderPrimitiveSpawn *)data;
int x = state->x, y = state->y, z = state->z;
int y_light = y + 1;
unsigned char blocklight, skylight;
PyObject *block_py;
/* set a nice, pretty red color */
*r = 229;
@@ -75,8 +73,6 @@ overlay_spawn_start(void *data, RenderState *state, PyObject *support) {
static void
overlay_spawn_finish(void *data, RenderState *state) {
RenderPrimitiveSpawn* self = (RenderPrimitiveSpawn *)data;
/* chain up */
primitive_overlay.finish(data, state);
}

View File

@@ -27,7 +27,6 @@ static void get_color(void *data, RenderState *state,
static int
overlay_start(void *data, RenderState *state, PyObject *support) {
PyObject *facemasks_py;
RenderPrimitiveOverlay *self = (RenderPrimitiveOverlay *)data;
self->facemask_top = PyObject_GetAttrString(support, "facemask_top");

View File

@@ -265,6 +265,8 @@ class CustomBuildExt(build_ext):
if c == "unix":
# customize the build options for this compilier
for e in self.extensions:
e.extra_compile_args.append("-Wno-unused-variable") # quell some annoying warnings
e.extra_compile_args.append("-Wno-unused-function") # quell some annoying warnings
e.extra_compile_args.append("-Wdeclaration-after-statement")
e.extra_compile_args.append("-Werror=declaration-after-statement")