diff --git a/src/utils/debuglog.cpp b/src/utils/debuglog.cpp index 7f0fe360..05b3f3f3 100644 --- a/src/utils/debuglog.cpp +++ b/src/utils/debuglog.cpp @@ -211,7 +211,7 @@ static void datestring(char *d, int sz) { static void datestring(char *d, int sz) { struct tm *tmp; - time_t tim = time((time_t)0); + time_t tim = time((time_t*)0); tmp = localtime(&tim); int year = tmp->tm_year % 100; snprintf(d, sz, "%02d%02d%02d%02d%02d%02d", year, tmp->tm_mon+1, diff --git a/src/utils/workqueue.h b/src/utils/workqueue.h index 8152270c..13b2651b 100644 --- a/src/utils/workqueue.h +++ b/src/utils/workqueue.h @@ -62,12 +62,12 @@ public: * meaning no limit. hi == -1 means that the queue is disabled. * @param lo minimum count of tasks before worker starts. Default 1. */ - WorkQueue(const string& name, int hi = 0, int lo = 1) + WorkQueue(const string& name, size_t hi = 0, size_t lo = 1) : m_name(name), m_high(hi), m_low(lo), m_workers_exited(0), m_clients_waiting(0), m_workers_waiting(0), m_tottasks(0), m_nowake(0), m_workersleeps(0), m_clientsleeps(0) { - m_ok = (m_high >= 0) && (pthread_cond_init(&m_ccond, 0) == 0) && + m_ok = (pthread_cond_init(&m_ccond, 0) == 0) && (pthread_cond_init(&m_wcond, 0) == 0); }