diff --git a/src/bbcp_Protocol.C b/src/bbcp_Protocol.C index e17f347..17bb8ab 100644 --- a/src/bbcp_Protocol.C +++ b/src/bbcp_Protocol.C @@ -944,7 +944,7 @@ void bbcp_Protocol::putCSV(char *Host, char *csFn, char *csVal, int csVsz) { //1234567890123 struct iovec iov[] = {{(char *)"Checksum: ", 10}, {bbcp_Cfg.csName,strlen(bbcp_Cfg.csName)}, - {(char *)" ", 1}, {csVal, csVsz}, + {(char *)" ", 1}, {csVal, static_cast(csVsz)}, {(char *)" ", 1}, {Host, strlen(Host)}, {(char *)":", 1}, {csFn, strlen(csFn)}, {(char *)"\n",1}}; diff --git a/src/bbcp_Pthread.h b/src/bbcp_Pthread.h index 4666e2a..142700e 100644 --- a/src/bbcp_Pthread.h +++ b/src/bbcp_Pthread.h @@ -33,6 +33,8 @@ #include #include +#include + class bbcp_CondVar { public: @@ -156,7 +158,7 @@ inline void Wait() {int rc; bbcp_Semaphore(int semval=1) {if (sem_init(&h_semaphore, 0, semval)) {throw "sem_init() failed", errno;} } - ~bbcp_Semaphore() {if (sem_destroy(&h_semaphore)) + ~bbcp_Semaphore() throw(std::exception) {if (sem_destroy(&h_semaphore)) {throw "sem_destroy() failed", errno;} }