Open Bug 1088845 Opened 10 years ago Updated 1 year ago

Annotate mozilla::pkix code so that compilers report missing return value checks

Categories

(NSS :: Libraries, enhancement, P5)

enhancement

Tracking

(Not tracked)

People

(Reporter: briansmith, Unassigned)

References

Details

+++ 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
Whiteboard: [psm-cleanup]
Priority: -- → P5

mozilla::pkix is part of NSS now

Assignee: nobody → nobody
Type: defect → enhancement
Component: Security: PSM → Libraries
Priority: P5 → --
Product: Core → NSS
QA Contact: jjones
Whiteboard: [psm-cleanup]
Version: Trunk → other
Severity: normal → N/A
Priority: -- → P3
Severity: N/A → S4
Priority: P3 → P5
You need to log in before you can comment on or make changes to this bug.