Cleanup declared but unused variables.
Make was complaining about a bunch of unused variables that were being declared. Signed-off-by: Bryce Harrington <bryce@canonical.com>
This commit is contained in:
committed by
Kristian Høgsberg
parent
9f89a40ec1
commit
40269a6ed6
@@ -341,7 +341,6 @@ static struct gears *
|
|||||||
gears_create(struct display *display)
|
gears_create(struct display *display)
|
||||||
{
|
{
|
||||||
const int x = 200, y = 200, width = 450, height = 500;
|
const int x = 200, y = 200, width = 450, height = 500;
|
||||||
EGLint major, minor;
|
|
||||||
struct gears *gears;
|
struct gears *gears;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|||||||
+4
-10
@@ -65,7 +65,6 @@ static void set_boundary(struct smoke *smoke, float x, float y, float *p)
|
|||||||
static void diffuse(struct smoke *smoke, uint32_t time,
|
static void diffuse(struct smoke *smoke, uint32_t time,
|
||||||
float *source, float *dest)
|
float *source, float *dest)
|
||||||
{
|
{
|
||||||
cairo_t *cr;
|
|
||||||
float *s, *d;
|
float *s, *d;
|
||||||
int x, y, k, stride;
|
int x, y, k, stride;
|
||||||
float t, a = 0.0002;
|
float t, a = 0.0002;
|
||||||
@@ -88,10 +87,9 @@ static void diffuse(struct smoke *smoke, uint32_t time,
|
|||||||
static void advect(struct smoke *smoke, uint32_t time,
|
static void advect(struct smoke *smoke, uint32_t time,
|
||||||
float *uu, float *vv, float *source, float *dest)
|
float *uu, float *vv, float *source, float *dest)
|
||||||
{
|
{
|
||||||
cairo_t *cr;
|
|
||||||
float *s, *d;
|
float *s, *d;
|
||||||
float *u, *v;
|
float *u, *v;
|
||||||
int x, y, k, stride;
|
int x, y, stride;
|
||||||
int i, j;
|
int i, j;
|
||||||
float px, py, fx, fy;
|
float px, py, fx, fy;
|
||||||
|
|
||||||
@@ -128,7 +126,7 @@ static void project(struct smoke *smoke, uint32_t time,
|
|||||||
float *u, float *v, float *p, float *div)
|
float *u, float *v, float *p, float *div)
|
||||||
{
|
{
|
||||||
int x, y, k, l, s;
|
int x, y, k, l, s;
|
||||||
float h, *d, *q;
|
float h;
|
||||||
|
|
||||||
h = 1.0 / smoke->width;
|
h = 1.0 / smoke->width;
|
||||||
s = smoke->width;
|
s = smoke->width;
|
||||||
@@ -166,10 +164,8 @@ static void project(struct smoke *smoke, uint32_t time,
|
|||||||
|
|
||||||
static void render(struct smoke *smoke)
|
static void render(struct smoke *smoke)
|
||||||
{
|
{
|
||||||
cairo_t *cr;
|
unsigned char *dest;
|
||||||
unsigned char *source, *dest;
|
|
||||||
int x, y, width, height, stride;
|
int x, y, width, height, stride;
|
||||||
int k, t;
|
|
||||||
float *s;
|
float *s;
|
||||||
uint32_t *d, c, a;
|
uint32_t *d, c, a;
|
||||||
|
|
||||||
@@ -196,9 +192,7 @@ static void render(struct smoke *smoke)
|
|||||||
static void
|
static void
|
||||||
frame_callback(void *data, uint32_t time)
|
frame_callback(void *data, uint32_t time)
|
||||||
{
|
{
|
||||||
cairo_surface_t *t;
|
|
||||||
struct smoke *smoke = data;
|
struct smoke *smoke = data;
|
||||||
static int i;
|
|
||||||
|
|
||||||
diffuse(smoke, time / 30, smoke->b[0].u, smoke->b[1].u);
|
diffuse(smoke, time / 30, smoke->b[0].u, smoke->b[1].u);
|
||||||
diffuse(smoke, time / 30, smoke->b[0].v, smoke->b[1].v);
|
diffuse(smoke, time / 30, smoke->b[0].v, smoke->b[1].v);
|
||||||
@@ -270,7 +264,7 @@ int main(int argc, char *argv[])
|
|||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
struct smoke smoke;
|
struct smoke smoke;
|
||||||
struct display *d;
|
struct display *d;
|
||||||
int size, x, y;
|
int size;
|
||||||
|
|
||||||
d = display_create(&argc, &argv, NULL);
|
d = display_create(&argc, &argv, NULL);
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -203,7 +203,6 @@ display_create_drm_surface(struct display *display,
|
|||||||
EGLDisplay dpy = display->dpy;
|
EGLDisplay dpy = display->dpy;
|
||||||
cairo_surface_t *surface;
|
cairo_surface_t *surface;
|
||||||
struct wl_visual *visual;
|
struct wl_visual *visual;
|
||||||
struct wl_buffer *buffer;
|
|
||||||
EGLint name, stride;
|
EGLint name, stride;
|
||||||
|
|
||||||
EGLint image_attribs[] = {
|
EGLint image_attribs[] = {
|
||||||
@@ -343,7 +342,7 @@ display_create_shm_surface(struct display *display,
|
|||||||
struct shm_surface_data *data;
|
struct shm_surface_data *data;
|
||||||
cairo_surface_t *surface;
|
cairo_surface_t *surface;
|
||||||
struct wl_visual *visual;
|
struct wl_visual *visual;
|
||||||
int stride, alloc, fd;
|
int stride, fd;
|
||||||
char filename[] = "/tmp/wayland-shm-XXXXXX";
|
char filename[] = "/tmp/wayland-shm-XXXXXX";
|
||||||
|
|
||||||
data = malloc(sizeof *data);
|
data = malloc(sizeof *data);
|
||||||
|
|||||||
Reference in New Issue
Block a user