
On Fri, Dec 03, 2010 at 11:31:18AM -0700, Eric Blake wrote:
On 12/03/2010 10:08 AM, Justin Clift wrote:
Thanks Eric. Captured the complete make log this time, to ensure it's fixed.
The same warning also appears in a few other places. :/
libvirt.c: In function 'virDomainOpenConsole': libvirt.c:13169: warning: declaration of 'devname' shadows a global declaration [-Wshadow] /usr/include/stdlib.h:290: warning: shadowed declaration is here [-Wshadow]
Yuck. 'devname' is just too handy to be penalized by BSD's namespace pollution. What if we instead do this in internal.h:
#include <stdlib.h> /* Silence -Wshadow on BSD systems, which declare a devname() that we * don't care about */ #define devname vir_devname
then all other shadowing warnings should just go away, without us having to worry about the problem cropping up again.
I dunno, I'd just change our variable to dname, or devicename. Regards, Daniel