From: Pavan Deolasee Date: Fri, 11 Mar 2016 06:43:10 +0000 (+0530) Subject: Explicitly cast pthread_t to int for logging purposes X-Git-Tag: XL9_5_R1BETA2~25 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=30db4c1fb56e02f253c54ad86d4b5abf66bbdfc3;p=postgres-xl.git Explicitly cast pthread_t to int for logging purposes --- diff --git a/src/gtm/common/elog.c b/src/gtm/common/elog.c index a08dfd292f..9388130a46 100644 --- a/src/gtm/common/elog.c +++ b/src/gtm/common/elog.c @@ -114,10 +114,10 @@ log_line_prefix(StringInfo buf) * MyProcPid changes. MyStartTime also changes when MyProcPid does, so * reset the formatted start timestamp too. */ - if (log_my_pid != MyThreadID) + if (log_my_pid != (int) MyThreadID) { log_line_number = 0; - log_my_pid = MyThreadID; + log_my_pid = (int) MyThreadID; formatted_start_time[0] = '\0'; } log_line_number++; @@ -144,7 +144,7 @@ log_line_prefix(StringInfo buf) switch (Log_line_prefix[i]) { case 'p': - appendStringInfo(buf, "%lu", MyThreadID); + appendStringInfo(buf, "%u", (int) MyThreadID); break; case 'l': appendStringInfo(buf, "%ld", log_line_number);