openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Openexr-devel] Imf::Attribute compiler warning


From: Ken McGaugh
Subject: [Openexr-devel] Imf::Attribute compiler warning
Date: Fri, 6 Jun 2008 14:48:07 +1000

I'm seeing the following compiler warning under linux with gcc-4.0.2 when extra warnings are enabled (-Wextra):

/usr/local/include/OpenEXR/ImfAttribute.h:256: warning: base class 'class Imf::Attribute' should be explicitly initialized in the copy constructor

The code which triggers this is:

    Imath::M44f mat;
    Imf::Header hdr (720, 486);
    hdr.insert("mat", Imf::M44fAttribute(mat));

The warning goes away if I use an intermediate Imf::M44fAttribute object:

    Imath::M44f mat;
    Imf::M44fAttribute matAttr (mat);
    Imf::Header hdr (720, 486);
    hdr.insert("mat", matAttr);

The warning seems benign, but I wanted to check to make sure. Anybody know for sure?

Also, there is a typo in the commented example for ASSERT in IexMacros.h. In the example the order of the arguments is listed incorrectly.

Thanks.
--Ken





reply via email to

[Prev in Thread] Current Thread [Next in Thread]