Open Bug 1088845 Opened 8 years ago Updated 3 years ago
Annotate mozilla::pkix code so that compilers report missing return value checks
+++ This bug was initially created as a clone of Bug #1083539 +++ See bug 1083539. During routine refactoring I accidentally a return value check. Although it is probably impossible to write perfect code, such bugs should be allowed to exist in code that gets checked in. MSVC supports functions being annotated with _Check_return_ (when SAL is enabled), GCC has __attribute__((warn_unused_result)), the Linux kernel has the __must_check macro, MFBT has MOZ_WARN_UNUSED_RESULT (which doesn't support MSVC), etc. We should also look into other SAL and static analysis attributes for mozilla::pkix, in follow-up bugs. The current MOZILLA_PKIX_ prefix on macros defined by mozilla::pkix is a little unwieldy to use for annotations on every function and/or argument declaration. We should find a shorter prefix.
No longer blocks: 970542
Depends on: 1128413
Priority: -- → P5
Assignee: nobody → nobody
Type: defect → enhancement
Component: Security: PSM → Libraries
Priority: P5 → --
Product: Core → NSS
QA Contact: jjones
Version: Trunk → other
You need to log in before you can comment on or make changes to this bug.