diff options
author | Scott Anderson <ascent12@hotmail.com> | 2017-07-11 00:14:55 +1200 |
---|---|---|
committer | Scott Anderson <ascent12@hotmail.com> | 2017-07-11 00:14:55 +1200 |
commit | 8189c64d7f07a756abf5a6189719f02b2f1af967 (patch) | |
tree | 26a5b75622d0a750478dee5c8a5d99f5b75846b6 /examples | |
parent | be064df25ee7c03543bb86d27addaa297682fba7 (diff) |
Fixed that warnings that showed up with optimisations.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/cat.c | 9 | ||||
-rw-r--r-- | examples/cat.h | 2 | ||||
-rw-r--r-- | examples/rotation.c | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/examples/cat.c b/examples/cat.c index 0a4dba9e..cc1403d8 100644 --- a/examples/cat.c +++ b/examples/cat.c @@ -1,11 +1,8 @@ /* GIMP RGBA C-Source image dump (cat.c) */ -const struct { - unsigned int width; - unsigned int height; - unsigned int bytes_per_pixel; /* 2:RGB16, 3:RGB, 4:RGBA */ - unsigned char pixel_data[128 * 128 * 4 + 1]; -} cat_tex = { +#include "cat.h" + +const struct gimp_texture cat_tex = { 128, 128, 4, "[\227\017\377L\206\001\377M\212\002\377T\227\011\377V\231\010\377W\224\001\377[\222" "\001\377T\212\001\377P\211\001\377M\203\001\377P\212\001\377Q\217\001\377K\210\001\377" diff --git a/examples/cat.h b/examples/cat.h index 6db307fd..46dc50f6 100644 --- a/examples/cat.h +++ b/examples/cat.h @@ -5,7 +5,7 @@ struct gimp_texture { unsigned int width; unsigned int height; unsigned int bytes_per_pixel; /* 2:RGB16, 3:RGB, 4:RGBA */ - unsigned char pixel_data[128 * 128 * 3 + 1]; + unsigned char pixel_data[128 * 128 * 4 + 1]; }; extern const struct gimp_texture cat_tex; diff --git a/examples/rotation.c b/examples/rotation.c index 1b75ccaf..36e95f50 100644 --- a/examples/rotation.c +++ b/examples/rotation.c @@ -192,7 +192,7 @@ static void parse_args(int argc, char *argv[], struct wl_list *config) { } int main(int argc, char *argv[]) { - struct sample_state state = { 0 }; + struct sample_state state = {0}; wl_list_init(&state.config); parse_args(argc, argv, &state.config); |