noop-renderer: Remove volatile and use compiler attribute
clang-13 complains about bitwise xor assigments like the following: ../libweston/noop-renderer.c:62:25: warning: variable 'unused' set but not used [-Wunused-but-set-variable] volatile unsigned char unused = 0; Use the __attribute__((unused)) instead. Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
db06aea171
commit
9b0b5b57dd
@ -58,7 +58,7 @@ noop_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
|
||||
struct wl_shm_buffer *shm_buffer;
|
||||
uint8_t *data;
|
||||
uint32_t size, i, width, height, stride;
|
||||
volatile unsigned char unused = 0; /* volatile so it's not optimized out */
|
||||
__attribute__((unused)) int unused = 0;
|
||||
|
||||
if (!buffer)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user