From: evans1629 Date: Wed, 16 Apr 2003 22:41:39 +0000 (+0000) Subject: Added linux builtin type in inet.h to unix library. X-Git-Tag: splint-3_1_0~15 X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/commitdiff_plain/35e8712de8a20811e536e7506deb87e9492a710d Added linux builtin type in inet.h to unix library. Changed default setting of warnunixlib and error message. --- diff --git a/lib/unix.h b/lib/unix.h index 627bb30..4006d32 100644 --- a/lib/unix.h +++ b/lib/unix.h @@ -455,6 +455,7 @@ typedef /*@unsignedintegraltype@*/ sa_family_t; ** (updated 26 May 2002) */ +typedef /*@unsignedintegraltype@*/ __socklen_t; /* not in USB, but needed by linux */ typedef /*@unsignedintegraltype@*/ socklen_t; struct sockaddr { diff --git a/src/Makefile.am b/src/Makefile.am index aa76a9e..ead43f6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -211,7 +211,7 @@ HEADERSRC = Headers/abstBodyNode.h Headers/ltokenList.h \ Headers/letDeclNodeList.h Headers/typeNameNodeList.h \ Headers/lh.h Headers/typeNamePack.h \ Headers/limwr.h Headers/typeNode.h \ - Headers/uentry.h \ + Headers/uentry.h \ Headers/llerror.h Headers/uentryList.h \ Headers/llglobals.h Headers/usymId.h \ Headers/llgrammar2.h Headers/usymIdSet.h \ @@ -317,7 +317,7 @@ Headers/cgrammar_tokens.h cgrammar.c: cgrammar.c.der cgrammar.y bison.head bison $(CP) cgrammar.c.der cgrammar.c; \ else \ echo '* Making cgrammar.c'; \ - echo '* Note: Expect 157 shift/reduce conflicts and 123 reduce/reduce conflicts. (see cgrammar.y for explanation)'; \ + echo '* Note: Expect 157 shift/reduce conflicts and 123 reduce/reduce conflicts. (see cgrammar.y for explanation)'; \ $(BISON) $(YFLAGS) cgrammar.y; \ $(CAT) bison.head cgrammar.tab.c bison.reset | $(SED) 's/YYSTYPE/cgrammar_YYSTYPE/g' | $(SED) 's/lsllex/cgrammar_lsllex/g' > cgrammar.c; \ $(CP) cgrammar.c cgrammar.c.der; \ @@ -334,7 +334,7 @@ Headers/mtgrammar_tokens.h mtgrammar.c: mtgrammar.y $(CP) mtgrammar.c.der mtgrammar.c; \ else \ echo '* Making mtgrammar.c'; \ - echo '* Expect 11 shift/reduce conflicts.'; \ + echo '* Note: Expect 11 shift/reduce conflicts.'; \ $(BISON) $(YFLAGS) -p mt mtgrammar.y; \ $(CAT) bison.head mtgrammar.tab.c bison.reset >mtgrammar.c; \ $(CP) mtgrammar.c mtgrammar.c.der; \ @@ -350,7 +350,7 @@ Headers/llgrammar_gen.h Headers/llgrammar_gen2.h llgrammar.c: llgrammar.c.der ll $(CP) llgrammar.c.der llgrammar.c; \ else \ echo '* Making llgrammar.c'; \ - echo '* Expect 2 shift/reduce conflicts'; \ + echo '* Note: Expect 2 shift/reduce conflicts'; \ $(BISON) $(YFLAGS) -p yl llgrammar.y; \ $(CAT) bison.head llgrammar.tab.c bison.reset >llgrammar.c; \ $(CP) llgrammar.c llgrammar.c.der; \ diff --git a/src/Makefile.in b/src/Makefile.in index d501c7f..e32509e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -307,7 +307,7 @@ HEADERSRC = Headers/abstBodyNode.h Headers/ltokenList.h \ Headers/letDeclNodeList.h Headers/typeNameNodeList.h \ Headers/lh.h Headers/typeNamePack.h \ Headers/limwr.h Headers/typeNode.h \ - Headers/uentry.h \ + Headers/uentry.h \ Headers/llerror.h Headers/uentryList.h \ Headers/llglobals.h Headers/usymId.h \ Headers/llgrammar2.h Headers/usymIdSet.h \ @@ -1059,7 +1059,7 @@ Headers/cgrammar_tokens.h cgrammar.c: cgrammar.c.der cgrammar.y bison.head bison $(CP) cgrammar.c.der cgrammar.c; \ else \ echo '* Making cgrammar.c'; \ - echo '* Note: Expect 157 shift/reduce conflicts and 123 reduce/reduce conflicts. (see cgrammar.y for explanation)'; \ + echo '* Note: Expect 157 shift/reduce conflicts and 123 reduce/reduce conflicts. (see cgrammar.y for explanation)'; \ $(BISON) $(YFLAGS) cgrammar.y; \ $(CAT) bison.head cgrammar.tab.c bison.reset | $(SED) 's/YYSTYPE/cgrammar_YYSTYPE/g' | $(SED) 's/lsllex/cgrammar_lsllex/g' > cgrammar.c; \ $(CP) cgrammar.c cgrammar.c.der; \ @@ -1073,7 +1073,7 @@ Headers/mtgrammar_tokens.h mtgrammar.c: mtgrammar.y $(CP) mtgrammar.c.der mtgrammar.c; \ else \ echo '* Making mtgrammar.c'; \ - echo '* Expect 11 shift/reduce conflicts.'; \ + echo '* Note: Expect 11 shift/reduce conflicts.'; \ $(BISON) $(YFLAGS) -p mt mtgrammar.y; \ $(CAT) bison.head mtgrammar.tab.c bison.reset >mtgrammar.c; \ $(CP) mtgrammar.c mtgrammar.c.der; \ @@ -1087,7 +1087,7 @@ Headers/llgrammar_gen.h Headers/llgrammar_gen2.h llgrammar.c: llgrammar.c.der ll $(CP) llgrammar.c.der llgrammar.c; \ else \ echo '* Making llgrammar.c'; \ - echo '* Expect 2 shift/reduce conflicts'; \ + echo '* Note: Expect 2 shift/reduce conflicts'; \ $(BISON) $(YFLAGS) -p yl llgrammar.y; \ $(CAT) bison.head llgrammar.tab.c bison.reset >llgrammar.c; \ $(CP) llgrammar.c llgrammar.c.der; \ diff --git a/src/context.c b/src/context.c index e0755e4..c67fa9e 100644 --- a/src/context.c +++ b/src/context.c @@ -884,7 +884,7 @@ context_resetAllFlags (void) gc.flags[FLG_WARNFLAGS] = TRUE; gc.flags[FLG_WARNRC] = TRUE; gc.flags[FLG_FILEEXTENSIONS] = TRUE; - gc.flags[FLG_WARNUNIXLIB] = TRUE; + gc.flags[FLG_WARNUNIXLIB] = FALSE; gc.flags[FLG_WARNPOSIX] = TRUE; gc.flags[FLG_SHOWCOL] = TRUE; gc.flags[FLG_SHOWDEEPHISTORY] = FALSE; /* TRUE; */ @@ -3787,8 +3787,8 @@ context_userSetFlag (flagcode f, bool b) llerror_flagWarning (cstring_makeLiteral ("Selecting unix library. Unix library is " - "ad hoc addition to POSIX library. Recommend " - "use +posixlib to select POSIX library instead. " + "based on the Single Unix Specification, Version 2. Not all " + "Unix implementations are consistend with this specification. " "Use -warnunixlib to suppress this message.")); } } diff --git a/test/Makefile.am b/test/Makefile.am index 86c5314..51b5a3e 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -607,7 +607,7 @@ null: -$(SPLINTR) null1.c -null -mustdefine -expect 4 -$(SPLINTR) null2.c -expect 11 -$(SPLINTR) null3.c -expect 15 - -$(SPLINTR) null3.c -warnunixlib +unixlib -expect 16 + -$(SPLINTR) null3.c +unixlib -expect 16 -$(SPLINTR) null4.c -expect 1 -$(SPLINTR) null5.c -expect 4 -$(SPLINTR) null6 -expect 4 diff --git a/test/Makefile.in b/test/Makefile.in index c303afc..3984b50 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1407,7 +1407,7 @@ null: -$(SPLINTR) null1.c -null -mustdefine -expect 4 -$(SPLINTR) null2.c -expect 11 -$(SPLINTR) null3.c -expect 15 - -$(SPLINTR) null3.c -warnunixlib +unixlib -expect 16 + -$(SPLINTR) null3.c +unixlib -expect 16 -$(SPLINTR) null4.c -expect 1 -$(SPLINTR) null5.c -expect 4 -$(SPLINTR) null6 -expect 4 diff --git a/test/clauses.expect b/test/clauses.expect index b726830..03ddaef 100644 --- a/test/clauses.expect +++ b/test/clauses.expect @@ -29,9 +29,6 @@ clauses3.c:61:5: Storage x->x is released in one path, but live in another. Finished checking --- 2 code warnings, as expected -Command Line: Selecting unix library. Unix library is ad hoc addition to POSIX - library. Recommend use +posixlib to select POSIX library instead. Use - -warnunixlib to suppress this message. clauses3.c: (in function h) clauses3.c:48:5: Storage x->x is released in one path, but live in another. clauses3.c:46:10: Storage x->x released diff --git a/test/tests2.4/Makefile b/test/tests2.4/Makefile index 734a5ff..109c80e 100644 --- a/test/tests2.4/Makefile +++ b/test/tests2.4/Makefile @@ -49,7 +49,7 @@ print: $(SPLINT) print.c syslog: - $(SPLINT) syslog.c -warnunixlib +unixlib + $(SPLINT) syslog.c +unixlib error: $(SPLINT) error.c -expect 1