Uploaded image for project: 'Libmongocrypt'
  1. Libmongocrypt
  2. MONGOCRYPT-168

Build with clang-tidy in evergreen

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

      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@mongodb.com Kevin Albertson
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: