From: Marco van Wieringen Date: Thu, 19 Apr 2012 12:05:23 +0000 (+0200) Subject: Fix class member shadowing. X-Git-Tag: Release-7.0.0~234 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=014e3bb04feff509aa71212e3b15ca8d3bb3dfe3;p=bacula%2Fbacula Fix class member shadowing. "devlock.c", line 60: Warning: priority hides devlock::priority. --- diff --git a/bacula/src/lib/devlock.c b/bacula/src/lib/devlock.c index 5b26545d3f..99a1bc7ca9 100644 --- a/bacula/src/lib/devlock.c +++ b/bacula/src/lib/devlock.c @@ -57,14 +57,14 @@ devlock *new_devlock() return lock; } -int devlock::init(int priority) +int devlock::init(int initial_priority) { int stat; devlock *rwl = this; rwl->r_active = rwl->w_active = 0; rwl->r_wait = rwl->w_wait = 0; - rwl->priority = priority; + rwl->priority = initial_priority; if ((stat = pthread_mutex_init(&rwl->mutex, NULL)) != 0) { return stat; } diff --git a/bacula/src/lib/devlock.h b/bacula/src/lib/devlock.h index 263c870e96..779e53c399 100644 --- a/bacula/src/lib/devlock.h +++ b/bacula/src/lib/devlock.h @@ -66,7 +66,7 @@ private: public: devlock(int reason, bool can_take=false); ~devlock(); - int init(int priority); + int init(int initial_priority); int destroy(); int take_lock(take_lock_t *hold, int reason); int return_lock(take_lock_t *hold);