Build warnings for undefined MONGOC_TRACE in #if conditional

XMLWordPrintableJSON

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

      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:
              Hannes Magnusson (Inactive)
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: