Set warning level to max, use clang static analyzer or clang tidy (I'm not quite sure how those two relate to each other though), and especially ASAN (Address Sanitizer) and UBSAN (Undefined Behaviour Sanitizer) (and if you write threaded code: TSAN (ThreadSanitizer).
One thing that Apple did right in Xcode and where other IDEs lagged behind is easy access to those tools from the UI.
That sounds like all the things I do for c++. One thing I really like is that clang tidy can flag the "old way" to do stuff. Was hoping it had that for c.
One thing that Apple did right in Xcode and where other IDEs lagged behind is easy access to those tools from the UI.