const void * object initialization issue C++
<p>I have a <code>class</code>called <code>Tracer</code> in C++. In my <code>Tracer.h</code> file I have:</p>

<pre><code>class Tracer{

public:
    // not useful to the question.
private:
    Logger *m_logger;
    const char *m_who;
    const char *m_fileName;
    const void * m_theObject;
    int m_lineNum;
    int m_log_level;
}
</code></pre>

<p>And in <code>Tracer.cpp</code> I have:</p>

<pre><code>Tracer::Tracer(
        Logger *logger,
        const void *theObject,
        const char *who,
        const char *file,
        int line,
        int log_level
        ) :
        m_logger(logger),
        m_who(who),
        m_fileName(file),
        m_lineNum(line),
        m_theObject(theObject),
        m_log_level(log_level)
{
  // more implementation which is not useful to the problem.
</code></pre>

<p>The problem is, when I initialize <code>m_theObject(theObject)</code>, I get the following <strong>warning</strong>:</p>

<pre><code>/home/pribeiro/workspace/Tracer.h:80: warning:   'const void* Tracer::m_theObject'
/home/pribeiro/workspace/Tracer.cpp:27: warning:   when initialized here
</code></pre>

<p><code>Tracer.h:80</code> is the declaration of <code>m_theObject</code> in the <code>Tracer.h</code> and <code>Tracer.cpp:27</code> is the <code>m_theObject(theObject</code> line.
In my compilation level, <strong>warnings</strong> are treated like <strong>errors</strong>. Why is the compiler complaining about the initiliazation of a <code>const void *</code> pointer?</p>
