List:MySQL++« Previous MessageNext Message »
From:Jonathan Wakely Date:May 3 2007 4:17pm
Subject:Re: Issue with lockable.h
View as plain text  
On 03/05/07, Jason Ellis <jason@stripped> wrote:
> I am trying to incorporate mysql++ into an existing project and I have been
> able to get it to compile, however when I include the mysql++.h header file
> I get the following warnings when I compile:
> /usr/local/include/mysql++/lockable.h: In constructor
> 'mysqlpp::BasicLock::BasicLock(bool)':
> /usr/local/include/mysql++/lockable.h:82: warning: declaration of 'locked'
> shadows a member of 'this'
> /usr/local/include/mysql++/lockable.h: In constructor
> 'mysqlpp::Lockable::Lockable(bool)':
> /usr/local/include/mysql++/lockable.h:125: warning: declaration of 'locked'
> shadows a member of 'this'
> This happens even if I am not using anything from the mysql++ library.  I
> was just wondering if anyone had any suggestions on how to get rid of the
> warning.

The warning's harmless, but so is preventing it so probably worth doing.

I can't remember if gcc's -Wno-shadow will suppress the warning, it might do.

The best way is to rename either the BasicLock constructor parameter,
or the BasicLock::locked() member function.  The obvious choice that
won't break ABI is to rename the constructor parameter to is_locked,
or initially_locked.  Same goes for the Lockable constructor

Issue with lockable.hJason Ellis3 May
  • Re: Issue with lockable.hJonathan Wakely3 May
    • Re: Issue with lockable.hWarren Young19 Jun