]> git.sur5r.net Git - bacula/bacula/commit
Fix compilation warnings with GCC 6.1
authorEric Bollengier <eric@baculasystems.com>
Thu, 14 Jul 2016 15:43:43 +0000 (17:43 +0200)
committerKern Sibbald <kern@sibbald.com>
Fri, 15 Jul 2016 09:41:12 +0000 (11:41 +0200)
commit9ac32bb2ce9972ff30e0f9dcf2ed76989cdac4f5
tree8638ac3d5daadf97c08ae5f29a392b66b13a47ef
parentb87397a3542533e4c9af9c54ee8f3ef24d601cd0
Fix compilation warnings with GCC 6.1

The new GCC 6.1 considers that "this" is always different from NULL,
the compiler produces a warning, and the code is optimized in this
sens.

 this ? "something" : "somethingelse";

will always return "something", even if this is NULL.

This C++ trick was used with the alist

alist->size()    => if null, it returns 0
alist->empty()   => if null, it returns true
bacula/src/dird/fd_cmds.c
bacula/src/dird/ua_cmds.c
bacula/src/dird/ua_dotcmds.c
bacula/src/dird/ua_status.c
bacula/src/filed/status.c
bacula/src/lib/alist.h
bacula/src/lib/breg.c
bacula/src/lib/bsock.c
bacula/src/stored/autochanger.c
bacula/src/stored/status.c
bacula/src/tools/bsmtp.c