[gl2ps] gl2ps / 1.4.0 / gcc-9.2 / bug in gl2psPDFgroupListWriteXObjectResources() ?
Christophe Geuzaine
cgeuzaine at uliege.be
Tue Nov 12 22:31:41 CET 2019
> On 12 Nov 2019, at 11:18, Guy Barrand <guy.barrand at gmail.com> wrote:
>
>
> Hi Christophe
>
> gl2ps is indirectly tested/analysed by tools at CERN (because it is used in the visualisation of “Geant4”, a particle through matter simulation toolkit). I am using the gl2ps 1.4.0 code, and with gcc-9.2, CERN people say that there is a warning :
>
> geant4/source/analysis/g4tools/include/tools/sg/../gl2ps:4042:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
> 4042 | offs += fprintf(tools_gl2ps_context->stream, "/Im%d %d 0 R\n", gro->imno, gro->imobjno);
> | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> geant4/source/analysis/g4tools/include/tools/sg/../gl2ps:4043:5: note: here
> 4043 | case TOOLS_GL2PS_TRIANGLE:
> | ^~~~
>
> It looks that there is a “break:” missing in the gl2psPDFgroupListWriteXObjectResources() function before the "case GL2PS_TRIANGLE:” line of code.
>
> This time I am not so sure about this diagnostic, then I ask you… If not a bug, do you see a way to bypass this warning ?
>
Indeed there should be a break there. (It's harmless, though.) I've pushed the fix.
Thanks!
Christophe
> Thanks for any answer. Cheers. Guy
>
> Guy Barrand
> CNRS/IN2P3/LAL
>
>
>
> _______________________________________________
> gl2ps mailing list
> gl2ps at geuz.org
> http://www.geuz.org/mailman/listinfo/gl2ps
—
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine