mds/Locker.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
mds/Locker.cc: fix warning about 'Possible null pointer dereference'

Fix following warning from cppcheck:
 [src/mds/Locker.cc:2255] -> [src/mds/Locker.cc:2258]: (error)
   Possible null pointer dereference: in - otherwise it is redundant
   to check it against null.

Since head_in used for call pick_inode_snap() is already valid,
there is no need to check if 'CInode *in' is not NULL. Remove
not needed check.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
fusetrace_ll.cc: reduce scope of 'int err' in main()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
SyntheticClient.cc: Clarify calculation precedence for '%' and '?'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
librbd/internal.cc: clarify expression with parentheses

From cppcheck:
 [src/librbd/internal.cc:379]: (style) Boolean result is used in
 bitwise operation. Clarify expression with parentheses.
mon/Monitor.cc: Clarify calculation precedence for '%' and '?'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
mon/PGMonitor.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
msg/SimpleMessenger.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
os/FileStore.cc: remove assignment of a never used value

There is no need to set local variable basedir_fd to -1 after
closing and right before leaving the function.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
os/FileStore.cc: move variable async_done to the right #ifdef block

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
osdc/ObjectCacher.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
osdc/ObjectCacher.cc: set left to 0 instead off 'left -= left'

Instead of call 'left -= left', which results in 0, set left directly
to 0 and remove not needed assert call 'left == 0'.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
osdc/Objecter.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/osdmaptool.cc: remove some unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rados.cc: remove unused variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rados_export.cc: reduce scope of 'int ret' in do_rados_export()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rados_sync.cc: remove unused variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rados_sync.{cc,h}: pass some const std::string by reference

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rbd.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rbd_fuse/rbd-fuse.c: remove consecutive return/break statement

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>