]> granicus.if.org Git - graphviz/commitdiff
DevIL plugin: remove unused 'rc' variable
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 4 Mar 2022 05:58:51 +0000 (21:58 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Mar 2022 22:55:53 +0000 (14:55 -0800)
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

plugin/devil/gvdevice_devil.c

index ca217bc1b22e02318ee68f6e030dc6803fee7080..56e791aed2f870b5d3a4d707ee68796d2ac48f88 100644 (file)
@@ -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