Skip to content

Commit

Permalink
Clean up warnings
Browse files Browse the repository at this point in the history
New Xcode identifies warning that need fixing up
  • Loading branch information
barbalet committed Jul 28, 2015
1 parent 18dccee commit df0640e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 14 deletions.
31 changes: 17 additions & 14 deletions sim/gui/draw.c
Expand Up @@ -270,6 +270,7 @@ static n_byte pixel_black(n_int px, n_int py, n_int dx, n_int dy, void * informa
return 0;
}

#ifdef BRAINCODE_ON

static n_byte pixel_grey(n_int px, n_int py, n_int dx, n_int dy, void * information)
{
Expand All @@ -278,23 +279,21 @@ static n_byte pixel_grey(n_int px, n_int py, n_int dx, n_int dy, void * informat
return 0;
}

#endif

n_byte * draw_pointer(n_byte which_one)
{
n_byte *local_buffer = local_offscreen;

if (local_buffer == 0L)
{
return local_buffer;
}

switch(which_one)
if (local_offscreen)
{
case NUM_TERRAIN:
return TERRAINWINDOW(local_buffer);
break;
case NUM_VIEW:
return VIEWWINDOW(local_buffer);
break;
switch(which_one)
{
case NUM_TERRAIN:
return TERRAINWINDOW(local_offscreen);
break;
case NUM_VIEW:
return VIEWWINDOW(local_offscreen);
break;
}
}
return 0L;
}
Expand Down Expand Up @@ -1693,6 +1692,8 @@ static void draw_errors(noble_simulation * local_sim)
}
}

#ifdef BRAINCODE_ON

static void draw_line_braincode(n_string pointer, n_int line)
{
n_join local_mono;
Expand All @@ -1701,6 +1702,8 @@ static void draw_line_braincode(n_string pointer, n_int line)
draw_string(pointer, 4 + (terrain_dim_x/2) - 256, (line*12) + 246 + (terrain_dim_y/2) - 256, &local_mono);
}

#endif

void draw_terrain_coord(n_int * co_x, n_int * co_y)
{
*co_x = terrain_dim_x;
Expand Down
8 changes: 8 additions & 0 deletions sim/universe/console.c
Expand Up @@ -513,6 +513,9 @@ static void watch_appearance(void *ptr, n_string beingname, noble_being * local_
io_string_write(result, str, &watch_string_length);
}


#ifdef BRAINCODE_ON

static n_string static_result;

static void watch_line_braincode(n_string string, n_int line)
Expand All @@ -521,6 +524,8 @@ static void watch_line_braincode(n_string string, n_int line)
io_string_write(static_result, "\n", &watch_string_length);
}

#endif

/**
* Shows braincode for the given being
* @param ptr pointer to noble_simulation object
Expand Down Expand Up @@ -1166,6 +1171,7 @@ n_int console_logging(void * ptr, n_string response, n_console_output output_fun
return 0;
}

#ifdef BRAINCODE_ON

/**
* Compare two braincode arrays
Expand Down Expand Up @@ -1207,6 +1213,8 @@ static n_int console_compare_brain(n_byte * braincode0, n_byte * braincode1, n_i
return -1;
}

#endif

/**
* Shows repeated sections of braincode
* @param ptr
Expand Down

0 comments on commit df0640e

Please sign in to comment.