Korzystanie z adnotacji SAL w celu redukowanie defektów kodu C/C++Using SAL Annotations to Reduce C/C++ Code Defects
SAL to język adnotacji kodu źródłowego firmy Microsoft.SAL is the Microsoft source code annotation language. Przy użyciu adnotacji kodu źródłowego można wykonać zamiar za kodem jawnym.By using source code annotations, you can make the intent behind your code explicit. Te adnotacje umożliwiają również automatyczne analizowanie kodu przy użyciu narzędzi analitycznych statycznych, co znacznie mniej fałszywie dodatnich i fałszywych wartości ujemnych.These annotations also enable automated static analysis tools to analyze your code more accurately, with significantly fewer false positives and false negatives.
Artykuły w tej sekcji dokumentacji omawiają aspekty SAL, zawierają odwołania do składni SAL i dają przykłady użycia.The articles in this section of the documentation discuss aspects of SAL, provide reference for SAL syntax, and give examples of its use.
-
Zawiera informacje i przykłady pokazujące podstawowe adnotacje SAL.Provides information and examples that show the core SAL annotations.
-
Wyświetla listę adnotacji SAL dla funkcji i parametrów funkcji.Lists the SAL annotations for functions and function parameters.
Zachowanie funkcji dodawania adnotacjiAnnotating Function Behavior
Wyświetla adnotacje SAL dla funkcji i zachowania funkcji.Lists the SAL annotations for functions and function behavior.
Dodawanie adnotacji struktur i klasAnnotating Structs and Classes
Wyświetla listę adnotacji SAL dla struktur i klas.Lists the SAL annotations for structures and classes.
Dodawanie adnotacji do zachowania blokującegoAnnotating Locking Behavior
Wyjaśnia, jak używać adnotacji SAL z mechanizmami blokowania.Explains how to use SAL annotations with lock mechanisms.
Określanie miejsca i warunków stosowania adnotacjiSpecifying When and Where an Annotation Applies
Wyświetla listę adnotacji SAL, które określają warunek lub zakres (położenie) innych adnotacji SAL.Lists the SAL annotations that specify the condition or scope (placement) of other SAL annotations.
Funkcje wewnętrzneIntrinsic Functions
Wyświetla listę wewnętrznych adnotacji SAL.Lists the intrinsic SAL annotations.
Najlepsze rozwiązania i przykładyBest Practices and Examples
Zawiera przykłady, które pokazują, jak używać adnotacji SAL.Provides examples that show how to use SAL annotations. Wyjaśniono również typowe pułapek.Also explains common pitfalls.
Zobacz teżSee Also
Adnotacje SAL 2,0 dla sterowników systemu WindowsSAL 2.0 Annotations for Windows Drivers