On 2019-03-01 18:27, Gary R. Schmidt wrote:
[SNIP]

Changing "round" to "bacula_round" fixes this problem, as it is a
static function; on to the next (if there is one).

No errors in the build, but a couple of warnings and notes:
-----------------------------------------------------------
...
Compiling jcr.c
/src/bacula/bacula-9.4.2/libtool --tag=CXX --mode=compile /opt/local/bin/g++ -c -x c++ -fno-strict-aliasing -fno-exceptions -fno-rtti -I. -I.. -g -O -m64 -x c++ -fno-strict-aliasing -fno-exceptions -fno-rtti jcr.c libtool: compile: /opt/local/bin/g++ -c -x c++ -fno-strict-aliasing -fno-exceptions -fno-rtti -I. -I.. -g -O -m64 -x c++ -fno-strict-aliasing -fno-exceptions -fno-rtti jcr.c -fPIC -DPIC -o .libs/jcr.o
jcr.c: In function 'void dbg_print_jcr(std::FILE*)':
jcr.c:1223:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 # define get_threadid(a) (void *)(a)
                                    ^
jcr.c:1243:15: note: in expansion of macro 'get_threadid'
get_threadid(jcr->my_thread_id), (int)jcr->JobId, jcr->JobStatus, jcr, jcr->Job);
               ^~~~~~~~~~~~
...
Compiling lockmgr.c
/src/bacula/bacula-9.4.2/libtool --tag=CXX --mode=compile /opt/local/bin/g++ -c -x c++ -fno-strict-aliasing -fno-exceptions -fno-rtti -I. -I.. -g -O -m64 -x c++ -fno-strict-aliasing -fno-exceptions -fno-rtti lockmgr.c libtool: compile: /opt/local/bin/g++ -c -x c++ -fno-strict-aliasing -fno-exceptions -fno-rtti -I. -I.. -g -O -m64 -x c++ -fno-strict-aliasing -fno-exceptions -fno-rtti lockmgr.c -fPIC -DPIC -o .libs/lockmgr.o
lockmgr.c: In member function 'void lmgr_thread_t::_dump(std::FILE*)':
lockmgr.c:403:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
               (void *)thread_id, max, current);
                       ^~~~~~~~~
In file included from ../lib/lib.h:28:0,
                 from ../bacula.h:169,
                 from lockmgr.c:50:
lockmgr.c: In function 'bool lmgr_detect_deadlock_unlocked()':
lockmgr.c:632:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 # define TID thread_id
              ^
../lib/smartall.h:101:43: note: in definition of macro 'New'
 #define New(type) new(__FILE__, __LINE__) type
                                           ^~~~
lockmgr.c:660:68: note: in expansion of macro 'TID'
node = New(lmgr_node_t((void*)lock->lock, (void*)item->TID));
                                                                    ^~~
lockmgr.c:632:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 # define TID thread_id
              ^
../lib/smartall.h:101:43: note: in definition of macro 'New'
 #define New(type) new(__FILE__, __LINE__) type
                                           ^~~~
lockmgr.c:662:49: note: in expansion of macro 'TID'
node = New(lmgr_node_t((void*)item->TID, (void*)lock->lock));
                                                 ^~~

-----------------------------------------------------------

Now to try it with the real C++ compiler...

        Cheers,
                Gary    B-)


_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to