Comment 8 for bug 1248753

Revision history for this message
David Mathog (mathog) wrote :

A little bit of hyperbole is fine, but "very buggy" is hardly an appropriate categorization just because clang on your machine throws warnings. Please keep in mind that those files compile with zero warnings with g++ with very stringent checking turned on. Also the emf and wmf functions were tested extensively with valgrind and EMF/WMF test files while reading and writing the most complex metafiles I could find or generate myself, and that turned up no memory leaks in their code and no uninitialized memory accesses. (That did find leaks attributable to other Inkscape methods which must be called and leak, see bug 1043571.)

So I installed clang on my machine and compiled wmf-inout.cpp (just replaced "g++" with "clang"). This is all that it emitted:

  clang: warning: argument unused during compilation: '-fopenmp'

Not finding any of the warnings you cite, I then tried each of -O0, -O1, -O2, and -O3, and that still did not generate the warnings.

This is on Ubuntu 12.04.3 LTS, clang 3.0-6ubuntu3. 32 bit.

Initializing all of those variables will silence clang on your platform, but before doing that I want to see if there is really a bug in this somewhere, because if there is initializing those variables is going to mask it.

What platform are you using? Maybe there is a 32 bit vs. 64 bit issue?