OpenCL-ICD-Loader icon indicating copy to clipboard operation
OpenCL-ICD-Loader copied to clipboard

Add clang-tidy, clean up some warnings

Open mmha opened this issue 6 years ago • 0 comments

  • Add initial .clang-tidy config
  • Clear code base of found lints

It does not fully resolve #68 since we still need to enable a higher warning level in the compiler itself.

I've enabled all checks in clang-tidy and marked a few ones that I encountered while fixing the code as errors. misc-unused-parameters breaks on C, that's why I disabled it. We can change the concrete list of checks later on and tweak some parameters, but this PR cleans the code of all things found so far by clang-tidy.

The malloc of wrong size in one of the tests was a really good catch.

That's probably as good as we can get without converting the project to C++ (which, I mean, why not...)

mmha avatar May 12 '19 22:05 mmha