legends2k / NoSAL

Header disabling Microsoft SAL annotations (sal.h)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This project offers a sal.h that disables all SAL annotations defined by the original sal.h contained in Microsoft Visual Studio’s CRT library.

Using this header, instead of the original, renders all static analysis tools, depending on valid SAL annotations in C and C++ code, useless.

Why

Some libraries, like DirectX Math, needs sal.h to be included. Including the original, which is only available on Windows (SDK), is either not possible or doing so leads compiler errors in GCC and Clang.

Unless your project code uses SAL annotations, it should be safe to disable it in third-party code.

Thanks to cmake-init, a handy tool for project creation.

About

Header disabling Microsoft SAL annotations (sal.h)

License:Apache License 2.0


Languages

Language:CMake 70.7%Language:C 29.3%