Pay attention to warnings when compiling

By , last updated April 30, 2014

I have two methods stop() and remove(). In stop, remove is called with an async parameter.

void remove(bool async)
    /* do stuff*/

void stop()
    bool async = false,

I couldn’t figure out why my method wasn’t being called, until I recompiled the file and saw this warning:

warning C4189: 'remove' : local variable is initialized but not referenced

Then it was pretty clear what I’d miss.

(On my keyboard layout, comma and semicolon is on the same key, separated by pressing shift.)


Be the first to comment.

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>