clang
This commit is contained in:
parent
75ac7747a6
commit
5a06f53d74
@ -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,
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user