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

Build warnings for undefined MONGOC_TRACE in #if conditional

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 1.2.0
    • Component/s: libmongoc
    • None
    • Environment:
      GCC 4.9.2

      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
           ^
      

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

              Created:
              Updated:
              Resolved: