From ee60752ebdf4151207bdfb40fc4d9d6a4658f2ae Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Thu, 12 Nov 2020 17:17:20 +0200 Subject: [PATCH] tests: constify fill_image_with_color() Const has documentary value saying the code will not modify the parameter contents. Everything that can be const, should be const. Signed-off-by: Pekka Paalanen --- tests/weston-test-client-helper.c | 2 +- tests/weston-test-client-helper.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c index c9a9a55a2..22136ce17 100644 --- a/tests/weston-test-client-helper.c +++ b/tests/weston-test-client-helper.c @@ -1867,7 +1867,7 @@ client_create_viewport(struct client *client) * \param color The color to use. */ void -fill_image_with_color(pixman_image_t *image, pixman_color_t *color) +fill_image_with_color(pixman_image_t *image, const pixman_color_t *color) { pixman_image_t *solid; int width; diff --git a/tests/weston-test-client-helper.h b/tests/weston-test-client-helper.h index 90ab36165..bdd685bd0 100644 --- a/tests/weston-test-client-helper.h +++ b/tests/weston-test-client-helper.h @@ -280,7 +280,7 @@ struct wp_viewport * client_create_viewport(struct client *client); void -fill_image_with_color(pixman_image_t *image, pixman_color_t *color); +fill_image_with_color(pixman_image_t *image, const pixman_color_t *color); pixman_color_t * color_rgb888(pixman_color_t *tmp, uint8_t r, uint8_t g, uint8_t b);