]> granicus.if.org Git - graphviz/commitdiff
DevIL plugin: squash -Wsign-conversion warning for 'ilSaveF' call
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 4 Mar 2022 06:03:31 +0000 (22:03 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Mar 2022 22:55:53 +0000 (14:55 -0800)
The DevIL plugin provides a number of output devices for which it claims IDs
matching the DevIL `ILenum` types. That is, it effectively stashes the DevIL
output format in the Graphviz device ID. This change simply makes it more
obvious to the compiler that the translation back and forth is intentional. For
more information, see the DevIL manual.¹

¹ http://openil.sourceforge.net/docs/DevIL%20Manual.pdf

plugin/devil/gvdevice_devil.c

index 56e791aed2f870b5d3a4d707ee68796d2ac48f88..6c4ace94f4aa2a4e6b1165cf0f2a4501160ac84f 100644 (file)
@@ -63,7 +63,7 @@ static void devil_format(GVJ_t * job)
                job->imagedata);
     
     // output to the provided open file handle
-    ilSaveF(job->device.id, job->output_file);
+    ilSaveF((ILenum)job->device.id, job->output_file);
     
     // We're done with the image, so delete it.
     ilDeleteImages(1, &ImgId);