Build with clang-tidy in evergreen

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None

      Doing a one-off test with clang-tidy seems to surface some potential bugs:

      > clang-tidy src/mongocrypt-ctx.c
      
      /Users/kevinalbertson/code/libmongocrypt/src/mongocrypt-ctx.c:41:27: warning: Access to field 'status' results in a dereference of a null pointer (loaded from variable 'ctx') [clang-analyzer-core.NullDereference]
         _mongocrypt_set_error (ctx->status,
                                ^
      /Users/kevinalbertson/code/libmongocrypt/src/mongocrypt-ctx.c:481:8: note: Assuming 'ctx' is null
         if (!ctx || !ctx->initialized) {
      

      We should investigate and fix any clang-tidy/scan-build warnings and build in evergreen with clang-tidy.

              Assignee:
              Kevin Albertson
              Reporter:
              Kevin Albertson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: