Menu

#217 Fix compiler warnings in tcsd with inproper printf format

Bug
open
nobody
None
5
2017-08-08
2017-08-08
No

Fix compiler warnings in tcsd with inproper printf format.
This will also avoid misformatting data in error output.
The following Oracle Solaris patch, tcsd_tcsd_threads.c.patch, is suitable for all operating systems and compilers.

--- src/tcsd/tcsd_threads.c 2010-09-10 12:50:27.000000000 -0700
+++ src/tcsd/tcsd_threads.c 2012-04-23 14:27:25.589107000 -0700
@@ -185,13 +185,13 @@

if ((rc = sigfillset(&thread_sigmask))) {
    LogError("sigfillset failed: error=%d: %s", rc, strerror(rc));
  • LogError("worker thread %ld is exiting prematurely", THREAD_ID);
  • LogError("worker thread %lu is exiting prematurely", (unsigned long)THREAD_ID);
    THREAD_EXIT(NULL);
    }

    if ((rc = THREAD_SET_SIGNAL_MASK(SIG_BLOCK, &thread_sigmask, NULL))) {
    LogError("Setting thread sigmask failed: error=%d: %s", rc, strerror(rc));

  • LogError("worker thread %ld is exiting prematurely", THREAD_ID);

  • LogError("worker thread %lu is exiting prematurely", (unsigned long)THREAD_ID);
    THREAD_EXIT(NULL);
    }
    }

Discussion


Log in to post a comment.

MongoDB Logo MongoDB