This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/134] New: error.h could be annotated better for splint


error() conditionally does not return if the first parameter is non-0. This
information is very useful to splint (www.splint.org) because it can then give
better analysis for following lines of code. The following voodoo provides this
information:

#ifdef S_SPLINT_S
extern /*@noreturnwhentrue@*/ void error (int /*@alt bool @*/ __status, int
__errnum, const char *__format, ...)
     /*__attribute__ ((__format__ (__printf__, 3, 4))) */;
#else
extern void error (int __status, int __errnum, const char *__format, ...)
     __attribute__ ((__format__ (__printf__, 3, 4)));
#endif

Or the /*@...@*/ comments can just be merged directly:

extern /*@noreturnwhentrue@*/ void error (int /*@alt bool @*/ __status, int
__errnum, const char *__format, ...)
     __attribute__ ((__format__ (__printf__, 3, 4)));

-- 
           Summary: error.h could be annotated better for splint
           Product: glibc
           Version: 2.3.2
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: rw at shadow dot org dot uk
                CC: glibc-bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=134

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]