Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-766

Build warnings for undefined MONGOC_TRACE in #if conditional

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 1.2.0
    • libmongoc
    • None
    • GCC 4.9.2

    Description

      Noticed the following warnings when compiling 1.2.0-dev with -Werror. Should these be changed to #ifdef MONGOC_TRACE, or perhaps just wrapped in a defined check (if you actual mean to check for a non-zero value here)?

      src/mongoc/mongoc-log.c: In function 'mongoc_log':
      src/mongoc/mongoc-log.c:84:5: warning: "MONGOC_TRACE" is not defined [-Wundef]
       #if MONGOC_TRACE
           ^
      src/mongoc/mongoc-log.c: In function 'mongoc_log':
      src/mongoc/mongoc-log.c:84:5: warning: "MONGOC_TRACE" is not defined [-Wundef]
       #if MONGOC_TRACE
           ^
      tests/test-mongoc-log.c: In function ‘should_run_trace_tests’:
      tests/test-mongoc-log.c:93:5: warning: "MONGOC_TRACE" is not defined [-Wundef]
       #if MONGOC_TRACE
           ^
      tests/TestSuite.c: In function ‘TestSuite_RunTest’:
      tests/TestSuite.c:390:5: warning: "MONGOC_TRACE" is not defined [-Wundef]
       #if MONGOC_TRACE
           ^
      

      Attachments

        Activity

          People

            bjori Hannes Magnusson
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: