build: Fix compiler warning and properly cast return value of pthread_self() to long
This commit is contained in:
parent
b9344a0f3b
commit
9f9f816a34
2 changed files with 2 additions and 2 deletions
|
@ -307,7 +307,7 @@ void tvhlogv ( const char *file, int line,
|
|||
/* Basic message */
|
||||
l = 0;
|
||||
if (options & TVHLOG_OPT_THREAD) {
|
||||
l += snprintf(buf + l, sizeof(buf) - l, "tid %ld: ", pthread_self());
|
||||
l += snprintf(buf + l, sizeof(buf) - l, "tid %ld: ", (long)pthread_self());
|
||||
}
|
||||
l += snprintf(buf + l, sizeof(buf) - l, "%s: ", subsys);
|
||||
if (options & TVHLOG_OPT_FILELINE && severity >= LOG_DEBUG)
|
||||
|
|
|
@ -99,7 +99,7 @@ thread_wrapper ( void *p )
|
|||
|
||||
/* Run */
|
||||
tvhdebug("thread", "created thread %ld [%s / %p(%p)]",
|
||||
pthread_self(), ts->name, ts->run, ts->arg);
|
||||
(long)pthread_self(), ts->name, ts->run, ts->arg);
|
||||
void *r = ts->run(ts->arg);
|
||||
free(ts);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue