From: Matthew Fernandez Date: Fri, 4 Mar 2022 05:58:51 +0000 (-0800) Subject: DevIL plugin: remove unused 'rc' variable X-Git-Tag: 4.0.0~197^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9d48d3bfea89e39607bc0e70ff518dbe07892f3a;p=graphviz DevIL plugin: remove unused 'rc' variable According to the DevIL API docs,¹ any error from `ilTexImage` is reported via `ilGetError`, not through its return value. Squashes a -Wunused-but-set-variable warning. ¹ https://www-f9.ijs.si/~matevz/docs/DevIL/il/f00059.htm --- diff --git a/plugin/devil/gvdevice_devil.c b/plugin/devil/gvdevice_devil.c index ca217bc1b..56e791aed 100644 --- a/plugin/devil/gvdevice_devil.c +++ b/plugin/devil/gvdevice_devil.c @@ -35,7 +35,6 @@ static void devil_format(GVJ_t * job) { ILuint ImgId; ILenum Error; - ILboolean rc; // Check if the shared lib's version matches the executable's version. if (ilGetInteger(IL_VERSION_NUM) < IL_VERSION || @@ -56,7 +55,7 @@ static void devil_format(GVJ_t * job) Y_inv ( job->width, job->height, job->imagedata ); // let the DevIL do its thing - rc = ilTexImage( job->width, job->height, + (void)ilTexImage(job->width, job->height, 1, // Depth 4, // Bpp IL_BGRA, // Format