[Mesa-dev] [PATCH kmscube] texturator: Only define png variable when libpng is present

Fabio Estevam festevam at gmail.com
Tue Mar 31 11:58:02 UTC 2020

When libpng is not present the following build warning is seen:

../texturator.c:98:13: warning: 'png' defined but not used [-Wunused-variable]
 static bool png;

Fix it by only defining the png variable when HAVE_LIBPNG is defined.

Signed-off-by: Fabio Estevam <festevam at gmail.com>
 texturator.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/texturator.c b/texturator.c
index 2675244..a450dfe 100644
--- a/texturator.c
+++ b/texturator.c
@@ -95,7 +95,9 @@ static int error_frames;
 static int zoom = 1;
 static bool full;
 static bool stop;
 static bool png;
 static GLenum target;
 static struct size {
 	unsigned x, y, z;

More information about the mesa-dev mailing list